Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4)

Delta Between Two Patch Sets: src/pkg/strconv/quote.go

Issue 160200044: [dev.power64] code review 160200044: build: merge default into dev.power64 (Closed)
Left Patch Set: Created 10 years, 4 months ago
Right Patch Set: diff -r be0c14f62257b42485019e9e1db23cf40d2e249f https://code.google.com/p/go Created 10 years, 4 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/strconv/makeisprint.go ('k') | src/pkg/strings/strings.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4
5 //go:generate go run makeisprint.go -output isprint.go
4 6
5 package strconv 7 package strconv
6 8
7 import ( 9 import (
8 "unicode/utf8" 10 "unicode/utf8"
9 ) 11 )
10 12
11 const lowerhex = "0123456789abcdef" 13 const lowerhex = "0123456789abcdef"
12 14
13 func quoteWith(s string, quote byte, ASCIIonly bool) string { 15 func quoteWith(s string, quote byte, ASCIIonly bool) string {
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 if i >= len(isPrint) || rr < isPrint[i&^1] || isPrint[i|1] < rr { 446 if i >= len(isPrint) || rr < isPrint[i&^1] || isPrint[i|1] < rr {
445 return false 447 return false
446 } 448 }
447 if r >= 0x20000 { 449 if r >= 0x20000 {
448 return true 450 return true
449 } 451 }
450 r -= 0x10000 452 r -= 0x10000
451 j := bsearch16(isNotPrint, uint16(r)) 453 j := bsearch16(isNotPrint, uint16(r))
452 return j >= len(isNotPrint) || isNotPrint[j] != uint16(r) 454 return j >= len(isNotPrint) || isNotPrint[j] != uint16(r)
453 } 455 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b