9b2a8f07a3
[common] Add ASCIITrim
2018-04-23 01:32:18 -07:00
d94e312673
add MarshalJSON and UnmarshalJSON to BitArray ( #200 )
...
See CHANGELOG
2018-04-23 00:16:05 -07:00
ee67e34519
Fix lint errors ( #190 )
...
* use increment and decrement operators.
* remove unnecessary else branches.
* fix receiver names.
* remove omittable code.
* fix dot imports.
2018-04-03 12:23:28 +02:00
898216d419
add SplitAndTrim func ( #183 )
...
Refs https://github.com/tendermint/tendermint/issues/1380
2018-03-29 12:04:01 +02:00
4b0058dd64
common: remove {Left, Right}PadString ( #168 )
...
Fixes #134
Those functions are unused in the whole Tendermint Github
organization plus they were unnecessariy verbose and could
have been concisely replaced with
```go
func RightPadString(s string, totalLength uint) string {
return fmt.Sprintf("% *s", totalLength, s)
}
func LeftPadString(s string, totalLength uint) string {
return fmt.Sprintf("% -*s", totalLength, s)
}
```
delete them anyways
2018-03-18 15:19:23 +04:00
99437a96fb
Add efficient implementation of fmt and use for errors.
2018-03-17 15:23:22 +01:00
951333ecb0
common: IsHex should be able to handle 0X prefixed strings
...
IsHex should also successfully decode strings prefixed with
0X instead of only 0x strings.
Also add tests generally for IsHex.
2018-02-02 23:41:24 -07:00
33abe87c5b
IntInSlice and StringInSlice functions
...
Refs https://github.com/tendermint/tendermint/pull/835
2017-11-29 12:18:03 -06:00
d6e03d2368
linting: add to Makefile & do some fixes
2017-09-22 11:42:29 -04:00
925f2b3350
golint corrections
2017-06-05 16:22:01 -04:00
295f6c2cc6
IsHex and StripHex
2017-06-05 15:50:11 -04:00
356657a37b
move all files to common/ to begin repo merge
2017-04-18 16:33:22 -04:00