- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for DecodeLastRune (0.36 sec)
-
src/unicode/utf8/utf8.go
} s3 := s[3] if s3 < locb || hicb < s3 { return RuneError, 1 } return rune(s0&mask4)<<18 | rune(s1&maskx)<<12 | rune(s2&maskx)<<6 | rune(s3&maskx), 4 } // DecodeLastRune unpacks the last UTF-8 encoding in p and returns the rune and // its width in bytes. If p is empty it returns ([RuneError], 0). Otherwise, if // the encoding is invalid, it returns (RuneError, 1). Both are impossible
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:36 UTC 2024 - 16.4K bytes - Viewed (0) -
src/html/template/js.go
if len(b) == 0 { // In, `x=y/{{.}}*z` a json.Marshaler that produces "" should // not cause the output `x=y/*z`. return " null " } first, _ := utf8.DecodeRune(b) last, _ := utf8.DecodeLastRune(b) var buf strings.Builder // Prevent IdentifierNames and NumericLiterals from running into // keywords: in, instanceof, typeof, void pad := isJSIdentPart(first) || isJSIdentPart(last) if pad {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 26 19:58:28 UTC 2024 - 14.1K bytes - Viewed (0) -
src/regexp/regexp.go
r1, r2 := endOfText, endOfText // 0 < pos && pos <= len(i.str) if uint(pos-1) < uint(len(i.str)) { r1 = rune(i.str[pos-1]) if r1 >= utf8.RuneSelf { r1, _ = utf8.DecodeLastRune(i.str[:pos]) } } // 0 <= pos && pos < len(i.str) if uint(pos) < uint(len(i.str)) { r2 = rune(i.str[pos]) if r2 >= utf8.RuneSelf { r2, _ = utf8.DecodeRune(i.str[pos:]) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:50:01 UTC 2024 - 38.5K bytes - Viewed (0)