- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for CanBackquote (0.38 sec)
-
src/strconv/quote.go
func AppendQuoteRuneToGraphic(dst []byte, r rune) []byte { return appendQuotedRuneWith(dst, r, '\'', false, true) } // CanBackquote reports whether the string s can be represented // unchanged as a single-line backquoted string without control // characters other than tab. func CanBackquote(s string) bool { for len(s) > 0 { r, wid := utf8.DecodeRuneInString(s) s = s[wid:] if wid > 1 { if r == '\ufeff' {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:21:28 UTC 2024 - 16.5K bytes - Viewed (0) -
src/fmt/format.go
// If f.sharp is set a raw (backquoted) string may be returned instead // if the string does not contain any control characters other than tab. func (f *fmt) fmtQ(s string) { s = f.truncateString(s) if f.sharp && strconv.CanBackquote(s) { f.padString("`" + s + "`") return } buf := f.intbuf[:0] if f.plus { f.pad(strconv.AppendQuoteToASCII(buf, s)) } else { f.pad(strconv.AppendQuote(buf, s)) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:31:55 UTC 2024 - 13.8K bytes - Viewed (0) -
src/fmt/doc.go
'#' alternate format: add leading 0b for binary (%#b), 0 for octal (%#o), 0x or 0X for hex (%#x or %#X); suppress 0x for %p (%#p); for %q, print a raw (backquoted) string if [strconv.CanBackquote] returns true; always print a decimal point for %e, %E, %f, %F, %g and %G; do not remove trailing zeros for %g and %G; write e.g. U+0078 'x' if the character is printable for %U (%#U)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 21:56:20 UTC 2024 - 14.6K bytes - Viewed (0) -
src/regexp/regexp.go
regexp, err := CompilePOSIX(str) if err != nil { panic(`regexp: CompilePOSIX(` + quote(str) + `): ` + err.Error()) } return regexp } func quote(s string) string { if strconv.CanBackquote(s) { return "`" + s + "`" } return strconv.Quote(s) } // NumSubexp returns the number of parenthesized subexpressions in this [Regexp]. func (re *Regexp) NumSubexp() int { return re.numSubexp
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:50:01 UTC 2024 - 38.5K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"AppendQuoteRuneToASCII", Func, 0}, {"AppendQuoteRuneToGraphic", Func, 6}, {"AppendQuoteToASCII", Func, 0}, {"AppendQuoteToGraphic", Func, 6}, {"AppendUint", Func, 0}, {"Atoi", Func, 0}, {"CanBackquote", Func, 0}, {"ErrRange", Var, 0}, {"ErrSyntax", Var, 0}, {"FormatBool", Func, 0}, {"FormatComplex", Func, 15}, {"FormatFloat", Func, 0}, {"FormatInt", Func, 0}, {"FormatUint", Func, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)