stones/cases

Types

UnsupportedCharacterError = object of ValueError
  Source Edit
Case = enum
  Default = "DEFAULT", Camel = "CAMEL", Kebab = "KEBAB", Lower = "LOWER", Pascal = "PASCAL",
  Snake = "SNAKE", Upper = "UPPER"
Supported case types.   Source Edit

Procs

proc setAcronyms(configAcronyms: HashSet[string]): void {...}{.raises: [], tags: [].}
Setter for acronyms to always apply ALLCAPS.   Source Edit
proc fromCamelCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.
    raises: [], tags: [].}
Converts camelCase string to snake_case.   Source Edit
proc toCamelCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.raises: [],
    tags: [].}
Converts snake_case string to camelCase.   Source Edit
proc fromKebabCase(s: string): string {...}{.raises: [], tags: [].}
Converts kebab-case string to snake_case.   Source Edit
proc toKebabCase(s: string): string {...}{.raises: [], tags: [].}
Converts snake_case string to kebab-case.   Source Edit
proc toLowerCase(s: string): string {...}{.raises: [], tags: [].}
Converts snake_case string to lowercase.   Source Edit
proc fromPascalCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.
    raises: [], tags: [].}
Converts PascalCase string to snake_case.   Source Edit
proc toPascalCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.raises: [],
    tags: [].}
Converts snake_case string to PascalCase.   Source Edit
proc fromUpperCase(s: string): string {...}{.raises: [], tags: [].}
Converts UPPER_CASE string to snake_case.   Source Edit
proc toUpperCase(s: string): string {...}{.raises: [], tags: [].}
Converts snake_case string to UPPER_CASE.   Source Edit
proc camelCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.
    deprecated: "Use `toCamelCase()` instead.", raises: [], tags: [].}
Deprecated: Use `toCamelCase()` instead.
toCamelCase()   Source Edit
proc kebabCase(s: string): string {...}{.deprecated: "Use `toKebabCase()` instead.",
                                raises: [], tags: [].}
Deprecated: Use `toKebabCase()` instead.
toKebabCase()   Source Edit
proc lowerCase(s: string): string {...}{.deprecated: "Use `toLowerCase()` instead.",
                                raises: [], tags: [].}
Deprecated: Use `toLowerCase()` instead.
toLowerCase()   Source Edit
proc pascalCase(s: string; acronyms: HashSet[string] = acronyms): string {...}{.
    deprecated: "Use `toPascalCase()` instead.", raises: [], tags: [].}
Deprecated: Use `toPascalCase()` instead.
toPascalCase()   Source Edit
proc upperCase(s: string): string {...}{.deprecated: "Use `toUpperCase()` instead.",
                                raises: [], tags: [].}
Deprecated: Use `toUpperCase()` instead.
toUpperCase()   Source Edit
proc currentCase(s: string): Case {...}{.raises: [UnsupportedCharacterError], tags: [].}
Guess the current case format of the string (not tested for edge cases). Returns Default if its not able to properly determine its case.   Source Edit
proc format(c: Case; s: string; acronyms: HashSet[string] = acronyms): string {...}{.
    raises: [UnsupportedCharacterError], tags: [].}
Convert s into the specified Case c based on the best guess of the current Case   Source Edit
proc allCases(s: string; c: Case = Default; acronyms: HashSet[string] = acronyms): Table[
    Case, string] {...}{.raises: [UnsupportedCharacterError, Exception], tags: [].}
Get a Table[Case, string] of all the difference cases from s.   Source Edit