Documentation
¶
Overview ¶
Package format implements various formatting functions.
Index ¶
- func CamelCaseToUnderscore(s string) string
- func LeftPaddingWithSize(l int, s string, ch string) string
- func PadZeroToNineWithZero(i int) string
- func RightPaddingWithSize(l int, s string, ch string) string
- func UnderscoreToLowerCamelCase(s string, t language.Tag) string
- func UnderscoreToUpperCamelCase(s string, t language.Tag) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelCaseToUnderscore ¶ added in v1.0.40
CamelCaseToUnderscore returns camel case string s in underscore style. For example: FooBar -> foo_bar
func LeftPaddingWithSize ¶ added in v1.0.36
LeftPaddingWithSize pads the string s with enough of character ch to the length l. For example: LeftPaddingWithSize(10, "hello", "*") will produce the string "*****hello"
func PadZeroToNineWithZero ¶ added in v1.0.30
PadZeroToNineWithZero pad i with '0' in front. For example: '0' => '00', '1' => '01' ... '9' => '09'
func RightPaddingWithSize ¶ added in v1.0.36
RightPaddingWithSize pads the string s with enough of character ch to the length l. For example: RightPaddingWithSize(10, "hello", "*") will produce the string "hello*****"
func UnderscoreToLowerCamelCase ¶ added in v1.0.40
UnderscoreToLowerCamelCase returns underscore string s in language t in lower camel case. For example: foo_bar -> fooBar
Types ¶
This section is empty.