- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 25 for Utf8 (0.05 sec)
-
src/bytes/bytes.go
r := rune(s[0]) if r >= utf8.RuneSelf { // search utf8.RuneError. for _, r = range chars { if r == utf8.RuneError { return 0 } } return -1 } if bytealg.IndexByteString(chars, s[0]) >= 0 { return 0 } return -1 } if len(chars) == 1 { r := rune(chars[0]) if r >= utf8.RuneSelf { r = utf8.RuneError } return IndexRune(s, r)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
src/bufio/scan.go
if atEOF && len(data) == 0 { return 0, nil, nil } // Fast path 1: ASCII. if data[0] < utf8.RuneSelf { return 1, data[0:1], nil } // Fast path 2: Correct UTF-8 decode without error. _, width := utf8.DecodeRune(data) if width > 1 { // It's a valid encoding. Width cannot be one for a correctly encoded // non-ASCII rune.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Oct 23 09:06:30 UTC 2023 - 14.2K bytes - Viewed (0) -
src/bytes/buffer_test.go
} } func TestRuneIO(t *testing.T) { const NRune = 1000 // Built a test slice while we write the data b := make([]byte, utf8.UTFMax*NRune) var buf Buffer n := 0 for r := rune(0); r < NRune; r++ { size := utf8.EncodeRune(b[n:], r) nbytes, err := buf.WriteRune(r) if err != nil { t.Fatalf("WriteRune(%U) error: %s", r, err) } if nbytes != size {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 18.6K bytes - Viewed (0) -
src/bufio/scan_test.go
import ( . "bufio" "bytes" "errors" "io" "strings" "testing" "unicode" "unicode/utf8" ) const smallMaxTokenSize = 256 // Much smaller for more efficient testing. // Test white space table matches the Unicode definition. func TestSpace(t *testing.T) { for r := rune(0); r <= utf8.MaxRune; r++ { if IsSpace(r) != unicode.IsSpace(r) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 14.3K bytes - Viewed (0) -
src/bytes/buffer.go
func (b *Buffer) WriteRune(r rune) (n int, err error) { // Compare as uint32 to correctly handle negative runes. if uint32(r) < utf8.RuneSelf { b.WriteByte(byte(r)) return 1, nil } b.lastRead = opInvalid m, ok := b.tryGrowByReslice(utf8.UTFMax) if !ok { m = b.grow(utf8.UTFMax) } b.buf = utf8.AppendRune(b.buf[:m], r) return len(b.buf) - m, nil }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Oct 29 16:47:05 UTC 2024 - 15.7K bytes - Viewed (0) -
src/bufio/bufio.go
func (b *Reader) ReadRune() (r rune, size int, err error) { for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) { b.fill() // b.w-b.r < len(buf) => buffer is not full } b.lastRuneSize = -1 if b.r == b.w { return 0, 0, b.readErr() } r, size = rune(b.buf[b.r]), 1 if r >= utf8.RuneSelf { r, size = utf8.DecodeRune(b.buf[b.r:b.w]) } b.r += size
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Oct 12 14:39:08 UTC 2023 - 21.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/UrlComponentEncodingTester.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 12.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-UtilJvm.kt
return millis.toInt() } internal fun List<Header>.toHeaders(): Headers { val builder = Headers.Builder() for ((name, value) in this) { builder.addLenient(name.utf8(), value.utf8()) } return builder.build() } internal fun Headers.toHeaderList(): List<Header> = (0 until size).map { Header(name(it), value(it)) }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon May 13 13:42:37 UTC 2024 - 10.7K bytes - Viewed (0) -
src/archive/zip/writer.go
// // Forbid 0x7e and 0x5c since EUC-KR and Shift-JIS replace those // characters with localized currency and overline characters. if r < 0x20 || r > 0x7d || r == 0x5c { if !utf8.ValidRune(r) || (r == utf8.RuneError && size == 1) { return false, false } require = true } } return true, require } // prepare performs the bookkeeping operations required at the start of
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Sep 23 14:32:33 UTC 2024 - 19.4K bytes - Viewed (0) -
internal/s3select/sql/value.go
// along with this program. If not, see <http://www.gnu.org/licenses/>. package sql import ( "encoding/json" "errors" "fmt" "math" "reflect" "strconv" "strings" "time" "unicode/utf8" ) var ( errArithMismatchedTypes = errors.New("cannot perform arithmetic on mismatched types") errArithInvalidOperator = errors.New("invalid arithmetic operator")
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Feb 25 20:31:19 UTC 2022 - 20.2K bytes - Viewed (0)