Documentation ¶
Index ¶
- func CommentBlock(str string) string
- func FirstLower(str string) string
- func FirstUpper(str string) string
- func RemoveSpecial(value string) string
- func Ternary(vt any, vf any, v bool) any
- func ToPascalCase(value string) string
- func ToSnakeCase(str string) string
- func TypeDisplayName(value string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CommentBlock ¶
CommentBlock outputs the string as a comment block, ie prefixing each line with //
func FirstLower ¶
FirstLower sets the first character of the string to lower case
func FirstUpper ¶
FirstUpper sets the first character of the string to upper case
func RemoveSpecial ¶
RemoveSpecial removes any non-ascii characters from the string
func Ternary ¶ added in v2.1.1
Ternary returns the first value if the last value is true, otherwise returns the second value.
func ToPascalCase ¶
ToPascalCase returns a pascal-cased (e.g. SomeValueLikeThis) out of a string
func TypeDisplayName ¶
TypeDisplayName returns the value with special characters replaced with there semantic meaning and then converted to pascal case. For example,
*string
becomes
NullableString
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.