Aller au contenu

string

Ce contenu n’est pas encore disponible dans votre langue.

String utils for common string manipulation.

Examples are capitalize and splitCamelCase

Functions

camlelcaseize()

function camlelcaseize(str): string

Transforms a string into CamelCase.

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:64


capitalize()

function capitalize(str): string

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:19


capitalizeWords()

function capitalizeWords(str): string

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:23


getSharedString()

function getSharedString(strings, options): string

Parameters

strings: string[] | string[][]

options = {}

options.camelcase?: boolean

options.pluralize?: boolean

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:198


getVarsFromFormatString()

function getVarsFromFormatString(formatString): string[]

Parameters

formatString: string

Returns

string[]

Defined in

tmp/commons/src/lib/utils/string.ts:213


initials()

function initials(str): string

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:46


isAlphaNumChar()

function isAlphaNumChar(str): boolean

Parameters

str: string

Returns

boolean

Defined in

tmp/commons/src/lib/utils/string.ts:27


isPlural()

function isPlural(word): boolean

Test if provided word is plural.

Parameters

word: string

Returns

boolean

Defined in

tmp/commons/src/lib/utils/string.ts:16


isSingular()

function isSingular(word): boolean

Test if provided word is singular.

Parameters

word: string

Returns

boolean

Defined in

tmp/commons/src/lib/utils/string.ts:16


matchingParts()

function matchingParts(
s,
ref,
options): object[]

Parameters

s: string

ref: string

options = {}

options.caseInsensitive?: boolean

Returns

object[]

Defined in

tmp/commons/src/lib/utils/string.ts:218


plural()

function plural(word): string

Pluralize a word based.

Parameters

word: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:16


pluralize()

function pluralize(
word,
count?,
inclusive?): string

Pluralize or singularize a word based on the passed in count.

Parameters

word: string

count?: number

inclusive?: boolean

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:15


singular()

function singular(word): string

Singularize a word based.

Parameters

word: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:16


splitCamelCase()

function splitCamelCase(str): string[]

Splits a camel case string into an array of words.

Parameters

str: string

Camel case string to split.

Returns

string[]

Array of words.

Defined in

tmp/commons/src/lib/utils/string.ts:111


titlelize()

function titlelize(str): string

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:37


unCamelCase()

function unCamelCase(str): string

Transforms a Camelcase string into a normal space seperated string.

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:81


words()

function words(str): string

Parameters

str: string

Returns

string

Defined in

tmp/commons/src/lib/utils/string.ts:32