Debian Codegraph @

bytcase/doc.go

raw
1 // Copyright 2024 Charlie Vieth. All rights reserved.
2 // Use of this source code is governed by the MIT license.
3
4 /*
5 Package [bytcase] is a case-insensitive and Unicode aware implementation of the
6 Go standard library's [bytes] package that is fast, accurate, and never
7 allocates memory.
8
9 Simple Unicode case-folding is used for all comparisons. This matches the
10 behavior of [bytes.EqualFold].
11
12 Package bytcase also provides two functions for identifying non-ASCII characters
13 that are not available in the bytes package: [IndexNonASCII] and
14 [ContainsNonASCII].
15 On amd64 and arm64 these functions are implemented in assembly and their
16 performance is mostly governed by memory bandwidth.
17
18 [bytes]: https://pkg.go.dev/bytes
19 [bytcase]: https://pkg.go.dev/github.com/charlievieth/strcase/bytcase
20 */
21 package bytcase
22
23 // BUG(cvieth): There is no mechanism for full case folding, that is, for
24 // characters that involve multiple runes in the input or output
25 // (see: https://pkg.go.dev/unicode#pkg-note-BUG).
26 //
27 // This is a limitation of Go's [unicode] package.
28 //
29 // [unicode]: https://pkg.go.dev/unicode#pkg-note-BUG