summaryrefslogtreecommitdiff
path: root/src/pkg/strconv
AgeCommit message (Collapse)AuthorFilesLines
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý5-63/+152
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý1-4/+4
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý1-1/+1
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý2-3/+2
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý4-55/+20
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý14-478/+534
2010-07-01strconv.Uitob64: allow conversion of 64-bit binaries (buffer was too small).Rob Pike2-1/+6
panic if base is invalid. R=rsc CC=golang-dev http://codereview.appspot.com/1702050
2010-07-01strings and bytes.Split: make count of 0 mean 0, not infinite.Rob Pike1-1/+1
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>
2010-06-29strconv: fix %.1f, 0.09Rob Pike3-6/+21
Fixes issue 822. Credit to http://codereview.appspot.com/1442041 by danielfleischman R=rsc CC=golang-dev http://codereview.appspot.com/1738047
2010-06-29strconv: fix %.2g, 40Rob Pike2-4/+21
Fixes issue 845. R=rsc CC=golang-dev http://codereview.appspot.com/1673049
2010-06-18strconv: add AtofN, FtoaNRuss Cox4-0/+47
R=r CC=golang-dev http://codereview.appspot.com/1700043
2010-05-18 Trivial optimization.Kyle Consalus1-6/+7
Cached string indexing in inner loop of Btoui64. Before: strconv_test.BenchmarkAtoi 5000000 309 ns/op strconv_test.BenchmarkAtoiNeg 5000000 325 ns/op strconv_test.BenchmarkAtoi64 5000000 465 ns/op strconv_test.BenchmarkAtoi64Neg 5000000 469 ns/op After: strconv_test.BenchmarkAtoi 10000000 182 ns/op strconv_test.BenchmarkAtoiNeg 10000000 193 ns/op strconv_test.BenchmarkAtoi64 10000000 251 ns/op strconv_test.BenchmarkAtoi64Neg 10000000 258 ns/op R=golang-dev, gri CC=golang-dev http://codereview.appspot.com/1227042 Committer: Robert Griesemer <gri@golang.org>
2010-05-03runtime, strconv: tiny cleanupsRuss Cox1-12/+5
R=r CC=golang-dev http://codereview.appspot.com/1081042
2010-03-30single argument panicRuss Cox1-1/+2
note that sortmain.go has been run through hg gofmt; only the formatting of the day initializers changed. i'm happy to revert that formatting if you'd prefer. stop on error in doc/progs/run R=r CC=golang-dev http://codereview.appspot.com/850041
2010-03-29strconv.Unquote could wrongly return a nil error on error.Roger Peppe1-1/+1
R=rsc, gri CC=golang-dev http://codereview.appspot.com/773041 Committer: Robert Griesemer <gri@golang.org>
2010-03-25Add strconv.Atob, Btoa.Rob Pike3-0/+85
Fixes issue 639 R=rsc CC=golang-dev http://codereview.appspot.com/755041
2010-03-24delete all uses of panicln by rewriting them using panic or,Rob Pike1-2/+2
in the tests, println+panic. gofmt some tests too. R=rsc CC=golang-dev http://codereview.appspot.com/741041
2010-02-25go/printer, gofmt: align comments in multi-line expression listsRobert Griesemer1-25/+25
- gofmt -w src misc - improves several lists and fixes minor degradation introduced with the fix for issue 628 - removed some dead code (stringList) R=rsc CC=golang-dev http://codereview.appspot.com/223058
2009-12-151) Change default gofmt default settings forRobert Griesemer14-658/+658
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
2009-12-09remove uses of string concatenation from src and misc directoryRobert Griesemer1-1/+1
R=rsc http://codereview.appspot.com/172041
2009-11-24Add benchmarks for commonly used routines.Trevor Strohman2-0/+48
R=rsc, r, r1 http://codereview.appspot.com/160046 Committer: Russ Cox <rsc@golang.org>
2009-11-23go: makes it build for the case $GOROOT has whitespacesSergio Luis O. B. Correia1-2/+2
the bash scripts and makefiles for building go didn't take into account the fact $GOROOT / $GOBIN could both be directories containing whitespaces, and was not possible to build it in such a situation. this commit adjusts the various makefiles/scripts to make it aware of that possibility, and now it builds successfully when using a path with whitespaces as well. Fixes issue 115. R=rsc, dsymonds1 http://codereview.appspot.com/157067 Committer: Russ Cox <rsc@golang.org>
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox5-15/+15
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-18remove bytes.CopyRob Pike1-6/+4
replace all calls with calls to copy use copy in regexp and bytes.Buffer R=rsc CC=golang-dev http://codereview.appspot.com/157073
2009-11-09- replaced gofmt expression formatting algorithm withRobert Griesemer9-102/+102
rsc's algorithm - applied gofmt -w misc src - partial CL (last chunk) R=rsc, r http://go/go-review/1024041
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer13-197/+197
R=rsc, r http://go/go-review/1025029
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer5-36/+12
- 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
2009-11-05gofmt'ed more stragglersRobert Griesemer1-1/+1
R=rsc http://go/go-review/1019004
2009-11-04gofmt-ify strconvRobert Griesemer6-76/+75
(and remove an empty line at the end of a file) R=rsc http://go/go-review/1017046
2009-11-01misc cleanupRuss Cox3-46/+41
R=r http://go/go-review/1016017
2009-10-27files that are okay from the last gofmt roundRuss Cox1-2/+2
R=gri http://go/go-review/1015011
2009-10-11correct a design flaw: Atoi etc should not guess the base.Russ Cox2-41/+113
leave that for Btoi with base == 0. R=r DELTA=146 (101 added, 29 deleted, 16 changed) OCL=35584 CL=35593
2009-10-08more lgtm files from gofmtRuss Cox4-34/+34
R=gri OCL=35485 CL=35488
2009-10-07apply gofmt to rand reflect regexp rpc runtime sort strconv strings sync ↵Russ Cox12-454/+451
syscall testing time unicode unsafe utf8 R=gri DELTA=1409 (79 added, 24 deleted, 1306 changed) OCL=35415 CL=35437
2009-09-17unused importsRuss Cox5-6/+0
R=r OCL=34731 CL=34731
2009-09-15more "declared and not used".Russ Cox1-2/+2
the last round omitted := range and only checked 1 out of N vars in a multi-var := R=r OCL=34624 CL=34638
2009-09-14fix "declared and not used" errors in non-test code.Russ Cox1-1/+0
R=r DELTA=112 (6 added, 57 deleted, 49 changed) OCL=34610 CL=34610
2009-08-31fmt: add verbs:Russ Cox1-10/+10
%E - upper case %e %G - upper case %g %#v - Go syntax R=r DELTA=332 (238 added, 47 deleted, 47 changed) OCL=34091 CL=34145
2009-08-31rearrange some constants. unicode package now defines MaxRune and ↵Rob Pike1-1/+2
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
2009-08-27remove Line in bufio.ReadLine(Bytes|Slice|String)Russ Cox1-1/+2
also drop bool arg from ReadString R=r DELTA=45 (13 added, 1 deleted, 31 changed) OCL=33923 CL=33960
2009-08-12convert low-level (used by testing) packages toRuss Cox13-181/+110
whole-package compilation. new Makefiles, tests now in separate package bytes flag fmt io math once os reflect strconv sync time utf8 delete import "xxx" in package xxx. inside package xxx, xxx is not declared anymore so s/xxx.//g delete file and package level forward declarations. note the new internal_test.go and sync and strconv to provide public access to internals during testing. the installed version of the package omits that file and thus does not open the internals to all clients. R=r OCL=33065 CL=33097
2009-07-02add Uitoa etc.Russ Cox2-24/+104
R=r DELTA=113 (89 added, 9 deleted, 15 changed) OCL=31087 CL=31096
2009-07-02fix atoi testRuss Cox2-17/+22
R=r DELTA=28 (5 added, 0 deleted, 23 changed) OCL=31093 CL=31093
2009-06-25Change os.Error convention:Russ Cox5-51/+124
echo back context of call in error if likely to be useful. For example, if os.Open("/etc/passwd", os.O_RDONLY) fails with syscall.EPERM, it returns as the os.Error &PathError{ Op: "open", Path: "/etc/passwd" Error: os.EPERM } which formats as open /etc/passwd: permission denied Not converted: datafmt go/... google/... regexp tabwriter template R=r DELTA=1153 (561 added, 156 deleted, 436 changed) OCL=30738 CL=30781
2009-06-24style police: parens in if, for, switch, rangeRuss Cox1-1/+1
R=r DELTA=32 (0 added, 3 deleted, 29 changed) OCL=30718 CL=30725
2009-06-24Change strings.Split, bytes.Split to take a maximum substring count argument.David Symonds1-3/+3
R=rsc APPROVED=r DELTA=131 (39 added, 10 deleted, 82 changed) OCL=30669 CL=30723
2009-06-23publish strconv.UnquoteCharRuss Cox2-27/+61
R=r DELTA=69 (37 added, 3 deleted, 29 changed) OCL=30661 CL=30667
2009-06-22introduce os.EOF and io.ErrUnexpectedEOF.Russ Cox1-1/+1
remove io.ErrEOF. rename io.FullRead to io.ReadFull, to match ReadAtLeast and ReadAll. remove io.FullReader, because it is now unused. R=r DELTA=295 (88 added, 105 deleted, 102 changed) OCL=30544 CL=30588
2009-06-09mv src/lib to src/pkgRob Pike15-0/+2875
tests: all.bash passes, gobuild still works, godoc still works. R=rsc OCL=30096 CL=30102