|
-
s
:
string
-
Returns:
string
|
|
Turns a given non-empty string into a nice 'camelCase' identifier
-
s
:
string
-
Returns:
string
|
|
Turns a given non-empty string into a nice 'PascalCase' identifier
-
s
:
string
-
Returns:
string
|
|
Return the plural of an English word
-
s
:
string
-
Returns:
string
|
|
Return the singular of an English word
-
s
:
string
-
Returns:
string
|
|
Trim HTML tags from a given string and replace all of them with spaces
Multiple tags are replaced with just a single space. (This is a recursive
implementation that is somewhat faster than regular expression.)
-
s
:
string
-
Returns:
string
|
|
Given a function to format names (such as 'niceCamelName' or 'nicePascalName')
returns a name generator that never returns duplicate name (by appending an
index to already used names)
This function is curried and should be used with partial function application:
let makeUnique = uniqueGenerator nicePascalName
let n1 = makeUnique "sample-name"
let n2 = makeUnique "sample-name"
-
niceName
:
string -> string
-
Returns:
string -> string
|