zig/lib/std
Andrew Kelley 2d9c4792ae std.fmt: clarify the use of "character"
Currently, std.fmt has a misguided, half-assed Unicode implementation
with an ambiguous definition of the word "character". This commit does
almost nothing to mitigate the problem, but it lets me close an open PR.

In the future I will revert 473cb1fd74 as
well as 279607cae5, and redo the whole
std.fmt API, breaking everyone's code and unfortunately causing nearly
every Zig user to have a bad day. std.fmt will go back to only dealing
in bytes, with zero Unicode awareness whatsoever. I suggest a third
party package provide Unicode functionality as well as a more advanced
text formatting function for when Unicode awareness is needed. I have
always suggested this, and I sincerely apologize for merging pull
requests that compromised my stance on this matter.

Most applications should, instead, strive to make their code independent
of Unicode, dealing strictly in encoded UTF-8 bytes, and never attempt
operations such as: substring manipulation, capitalization, alignment,
word replacement, or column number calculations.

Exceptions to this include web browsers, GUI toolkits, and terminals. If
you're not making one of these, any dependency on Unicode is probably a
bug or worse, a poor design decision.

closes #18536
2024-01-21 20:31:13 -07:00
..
Build Fix last_index after variable substitution 2024-01-21 03:16:09 -05:00
c translate-c: use Aro's tokenizer 2023-11-25 12:28:19 +02:00
compress lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
crypto Fix TLS record overflow by limiting inner record length to 2^14 2024-01-16 14:58:56 -08:00
dwarf openbsd: add proper support for aarch64 2024-01-18 15:45:42 -08:00
event rework std.atomic 2023-11-22 19:08:55 -07:00
fmt lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
fs std/fs/test.zig: Add statFile() tests of dangling symlink 2024-01-16 14:19:48 -08:00
hash AstGen: add error for using inline loops in comptime only scopes 2023-12-08 16:54:32 -08:00
heap std.heap: Use @alignOf(T) rather than 0 if not manually overridden for alignment of MemoryPool items 2023-11-21 13:23:53 +00:00
http std.http.Client: read response messages with no length until eof 2024-01-18 15:43:58 -08:00
io Fix fmt UTF-8 characters as fill (#18533) 2024-01-13 22:47:03 -05:00
json Revert "Merge pull request #18410 from dweiller/by-length-slice-bug" 2024-01-13 23:21:44 -07:00
math std.math: make hypot infer type from argument (#17910) 2024-01-20 01:32:07 -05:00
mem
meta AstGen: add error for redundant comptime var in comptime scope (#18242) 2024-01-09 20:09:39 -05:00
net std: disable flaky tcp server test 2023-12-19 12:01:09 -07:00
os child_process: Use security attributes while creating handle. 2024-01-16 01:25:14 -08:00
rand lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
sort lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
tar tar: rename reader to iterator 2024-01-13 19:37:33 -07:00
Target Re-run update_cpu_features (LLVM 17) 2024-01-09 17:53:43 +01:00
testing
Thread bsd: debitrot atomic and debug 2023-11-26 14:28:22 -05:00
time
tz
unicode
valgrind
zig std: remove deprecated API 2024-01-16 04:20:05 -08:00
array_hash_map.zig std: remove meta.trait 2023-11-22 13:24:27 -05:00
array_list.zig std.ArrayList: pedantic fixups to previous commit 2024-01-19 16:24:51 -07:00
ascii.zig
atomic.zig rework std.atomic 2023-11-22 19:08:55 -07:00
base64.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
bit_set.zig Merge pull request #17852 from ziglang/zig-reduce 2023-11-04 14:25:50 -04:00
BitStack.zig
bounded_array.zig
buf_map.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
buf_set.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
Build.zig zig build: add doc comments for functions related to options 2024-01-18 22:01:09 -07:00
builtin.zig Make @typeInfo return null-terminated strings 2024-01-07 15:35:18 +01:00
c.zig std.os: proper use of inline 2024-01-13 23:56:32 -07:00
child_process.zig child_process: Use security attributes while creating handle. 2024-01-16 01:25:14 -08:00
coff.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
compress.zig
comptime_string_map.zig do not enforce function parameters to be marked comptime if only called at comptime 2024-01-19 15:31:18 -08:00
crypto.zig
debug.zig byos: Ease GeneralPurposeAllocator integration 2024-01-16 15:05:38 -08:00
dwarf.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
dynamic_library.zig add ability to open dlls with platform-specific flags (#18370) 2024-01-09 20:11:22 -05:00
elf.zig elf: init output COMDAT group sections 2023-11-09 17:41:14 +01:00
enums.zig Work around stage1 not yet returning null-terminated @typeInfo strings 2024-01-07 16:21:08 +01:00
event.zig
fifo.zig
fmt.zig std.fmt: clarify the use of "character" 2024-01-21 20:31:13 -07:00
fs.zig std.fs.File: flatten struct 2023-11-22 15:24:57 -07:00
hash.zig
hash_map.zig std.hash_map: clarify error when Context is missing pub hash/eql 2023-12-23 16:15:19 +02:00
heap.zig byos: Ease GeneralPurposeAllocator integration 2024-01-16 15:05:38 -08:00
http.zig Remove some @as coercions from assertions 2024-01-03 21:20:48 +01:00
Ini.zig
io.zig std.io.GenericReader: add missing error annotations 2024-01-13 13:16:51 -08:00
json.zig
leb128.zig Dwarf: improve x86_64 backend debug info 2023-11-12 03:21:52 -05:00
linked_list.zig Revert "std.SinglyLinkedList: add sort function" 2023-11-24 22:33:50 -07:00
log.zig
macho.zig macho: rename flag to EXPORT_SYMBOL_FLAGS_WEAK_DEFINITION 2023-12-06 23:29:08 +01:00
math.zig std.math: add wrap function (#18154) 2024-01-14 20:45:39 -05:00
mem.zig mem: add byteswap array support (#17959) 2024-01-14 21:06:31 -05:00
meta.zig Fix failing type reifications 2024-01-07 16:27:50 +01:00
multi_array_list.zig Correct expected/actual parameter order of some assertions 2024-01-03 21:20:49 +01:00
net.zig Handle all errors on std.net.Ipv4address.resolveIP 2024-01-21 11:20:03 +02:00
once.zig x86_64: fix std test failures 2023-11-03 23:18:21 -04:00
os.zig std.os: proper use of inline 2024-01-13 23:56:32 -07:00
packed_int_array.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
pdb.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
priority_dequeue.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
priority_queue.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
process.zig Update ArgIterator on Windows to follow standard Windows parsing rules 2023-12-18 22:55:46 +01:00
Progress.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
rand.zig std: remove meta.trait 2023-11-22 13:24:27 -05:00
RingBuffer.zig std.RingBuffer.zig: Fix typo in readLastAssumeLength 2023-11-21 13:55:09 +02:00
segmented_list.zig
SemanticVersion.zig
simd.zig Deprecate suggestVectorSize in favor of suggestVectorLength 2024-01-01 16:18:57 +01:00
sort.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
start.zig stage2 AArch64: get empty file compiling again 2024-01-08 23:53:24 -08:00
start_windows_tls.zig
std.zig std.Target: flatten 2024-01-01 17:51:18 -07:00
tar.zig Permits tar directory path without trailing slash 2024-01-15 18:31:32 +02:00
Target.zig mingw: update build logic 2024-01-20 00:24:39 +00:00
testing.zig std.testing.expectEqualSlices: some improvements 2024-01-08 00:13:21 -07:00
Thread.zig doc: possible typo at std.Thread.spawn comment 2023-12-30 14:17:36 +02:00
time.zig os.uefi: add ns to epoch 2023-12-20 20:05:16 -08:00
treap.zig lib: correct unnecessary uses of 'var' 2023-11-19 09:55:07 +00:00
tz.zig std.builtin.Endian: make the tags lower case 2023-10-31 21:37:35 -04:00
unicode.zig Fix fmt UTF-8 characters as fill (#18533) 2024-01-13 22:47:03 -05:00
Uri.zig std.Uri: change specifier for printing with scheme to semicolon ; 2024-01-18 09:13:04 +02:00
valgrind.zig
wasm.zig
zig.zig std.Target.Query: remove deprecated API 2024-01-01 17:51:18 -07:00