Module
Data.String.Extra
- Package
- purescript-strings-extra
- Repository
- purescript-contrib/purescript-string-extras
#pascalCase Source
pascalCase :: String -> String
Converts a String
to Pascal case
pascalCase "Hello world" == "HelloWorld"
#levenshtein Source
levenshtein :: String -> String -> Int
Calculates the Levenshtein distance between two strings.
levenshtein "book" "back" -- 2
#sorensenDiceCoefficient Source
sorensenDiceCoefficient :: String -> String -> Number
Calculates the Sørensen-Dice coefficient between two strings.
sorensenDiceCoefficient "WHIRLED" "WORLD" -- 0.2000
#upperCaseFirst Source
upperCaseFirst :: String -> String
Converts the first character in a String
to upper case, lower-casing
the rest of the string.
upperCaseFirst "hello World" == "Hello world"
- Modules
- Data.
String. Extra