Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Use a count of -1 for infinity. Ditto for Replace.
R=rsc
CC=golang-dev
http://codereview.appspot.com/1704044
Committer: Rob Pike <r@golang.org>
|
|
This is the Replace I suggested in the review of CL 1114041.
It's true that we already have
regexp.MustCompile(regexp.QuoteMeta(old)).ReplaceAll(s, new)
but because this Replace is doing a simpler job it is
simpler to call and inherently more efficient.
I will add the bytes implementation and tests to the
CL after the strings one has been reviewed.
R=r, cw
CC=golang-dev
http://codereview.appspot.com/1731048
|
|
Change TrimRight and TrimLeft to use these functions.
Incidentally fix minor bug in TrimRight.
Add some test cases for this.
YMMV whether it's worth saving the closure allocation.
R=r, r2
CC=golang-dev, hoisie, rsc
http://codereview.appspot.com/1198044
Committer: Rob Pike <r@golang.org>
|
|
R=rsc
CC=golang-dev
http://codereview.appspot.com/940041
Committer: Russ Cox <rsc@golang.org>
|
|
strings.Trim*Func functions.
R=golang-dev, r
CC=golang-dev
http://codereview.appspot.com/824051
Committer: Rob Pike <r@golang.org>
|
|
equivalents TrimFunc, TrimLeftFunc, TrimRightFunc
R=rsc, r
CC=golang-dev
http://codereview.appspot.com/799048
Committer: Russ Cox <rsc@golang.org>
|
|
in character and string case mapping routines.
Add a custom mapper for Turkish and Azeri.
A more general solution for deriving the case information from Unicode's
SpecialCasing.txt will require more work.
Fixes issue 703.
R=rsc, rsc1
CC=golang-dev, mdakin
http://codereview.appspot.com/824043
|
|
+ first use in go/doc
R=r
CC=golang-dev
http://codereview.appspot.com/781041
|
|
gofmt -w -r 'strings.Bytes(a) -> []byte(a)' src/cmd src/pkg test/bench
gofmt -w -r 'strings.Runes(a) -> []int(a)' src/cmd src/pkg test/bench
delete unused imports
R=r
CC=golang-dev
http://codereview.appspot.com/224062
|
|
R=rsc, r, phf
CC=golang-dev
http://codereview.appspot.com/170046
Committer: Russ Cox <rsc@golang.org>
|
|
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
4th set of files.
R=rsc
CC=golang-dev
http://codereview.appspot.com/180049
|
|
xml: drop invalid characters in attribute names
when constructing struct field names.
R=rsc
CC=r
http://codereview.appspot.com/157104
Committer: Russ Cox <rsc@golang.org>
|
|
Split: fixed typo in documentation
R=rsc, r, r1
http://codereview.appspot.com/157170
Committer: Russ Cox <rsc@golang.org>
|
|
also pick off the special case in strings.Index. don't want strings.IndexByte
because the call site will very rarely need to allocate and we can handle the
test in the code itself. bytes.IndexByte can avoid a common allocation.
R=rsc
CC=golang-dev
http://codereview.appspot.com/156091
|
|
copy of a string or a byte array.
strings.Repeat("-", 50)
bytes.Repeat(b, 99)
R=rsc
http://codereview.appspot.com/155063
Committer: Russ Cox <rsc@golang.org>
|
|
packages.
thanks to ulrik.sverdrup for the test case.
Fixes issue 191.
R=rsc
CC=golang-dev
http://codereview.appspot.com/155056
|
|
rsc's algorithm
- applied gofmt -w misc src
- partial CL (last chunk)
R=rsc, r
http://go/go-review/1024041
|
|
R=rsc, r
http://go/go-review/1025029
|
|
- enabled for function declarations (not just function literals)
- applied gofmt -w $GOROOT/src
(look for instance at src/pkg/debug/elf/elf.go)
R=r, rsc
CC=go-dev
http://go/go-review/1026006
|
|
R=r
http://go/go-review/1018064
|
|
most common usage is:
lines := strings.SplitAfter(text, "\n", 0)
R=r
http://go/go-review/1018042
|
|
syscall testing time unicode unsafe utf8
R=gri
DELTA=1409 (79 added, 24 deleted, 1306 changed)
OCL=35415
CL=35437
|
|
the last round omitted := range and only
checked 1 out of N vars in a multi-var :=
R=r
OCL=34624
CL=34638
|
|
Change their names too.
R=rsc
DELTA=206 (123 added, 2 deleted, 81 changed)
OCL=34170
CL=34194
|
|
ReplacementChar.
utf8 package imports unicode to get those definitions.
regenerate dependencies.
R=rsc
DELTA=41 (19 added, 3 deleted, 19 changed)
OCL=34123
CL=34129
|
|
to whole-package compilation.
R=r
OCL=33070
CL=33101
|
|
R=r
DELTA=32 (0 added, 3 deleted, 29 changed)
OCL=30718
CL=30725
|
|
R=rsc
APPROVED=r
DELTA=131 (39 added, 10 deleted, 82 changed)
OCL=30669
CL=30723
|
|
R=rsc
APPROVED=rsc
DELTA=392 (386 added, 2 deleted, 4 changed)
OCL=29963
CL=30107
|
|
tests: all.bash passes, gobuild still works, godoc still works.
R=rsc
OCL=30096
CL=30102
|