aboutsummaryrefslogtreecommitdiff
path: root/lib/std/unicode.zig
AgeCommit message (Collapse)Author
2020-04-24Add mips support to standard libraryTimon Kruiper
2020-04-02new ArrayList API: fix everything elsexackus
2020-03-19update std lib to take advantage of slicing with comptime indexesAndrew Kelley
2020-03-07Implement UTF-8 to UTF-16LE literal conversionJared Miller
2020-02-21remove @bytesToSlice, @sliceToBytes from std libxackus
2020-02-12Switch a bunch of FBA to use testing.allocatorBenjamin Feng
2020-02-09fix off-by-one error in std.unicode.utf8ToUtf16LeWithNullAndrew Kelley
and fix larger-than-one-byte sentinels when being freed Thank you to João Pedro for identifying both problems and providing example code to solve them. closes #4413
2020-01-29Promoted "leak_count_allocator" to the main testing.allocatorBenjamin Feng
2020-01-29Create leak_count_allocatorBenjamin Feng
2020-01-29Move debug.global_allocator to testing.allocatorBenjamin Feng
2019-12-29std: sentinel terminated pointers for utf16 apisdaurnimator
2019-12-28std: unicode codepoints are 21 bitsdaurnimator
2019-12-28std: simplify utf8ToUtf16Ledaurnimator
Also faster, on my machine unicode/throughput_test.zig now gives e.g. > original utf8ToUtf16Le: elapsed: 1048 ns (0 ms) > new utf8ToUtf16Le: elapsed: 971 ns (0 ms)
2019-12-28std: optimise utf8ByteSequenceLengthdaurnimator
Also tested (but not as fast): ```zig pub fn utf8ByteSequenceLength(first_byte: u8) !u3 { const len = @clz(u8, ~first_byte); if (len == 0) return 1; if (len < 4) return @intCast(u3, len); return error.Utf8InvalidStartByte; } ```
2019-12-28std: fix unicode encoding of astral plane codepoints to utf16daurnimator
2019-12-16Fixes utf8ToUtf16Le (#3923)Dmitry Atamanov
2019-12-08std.fmt.format: tuple parameter instead of var argsAndrew Kelley
2019-11-27remove type coercion from array values to referencesAndrew Kelley
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
2019-11-08update more of the std lib to use `@as`Andrew Kelley
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221