Reference Source

Function

Static Public Summary
public

basename(): *

Get the basename of a path

public

exists(str: *): [Boolean]

Check the existence of a string in the string

public

Get first word from string

public

howMany(search: string, isCaseSensitive: Boolean): int

How many occurrences of a string in another string

public

initials(isInitialsCapital: Boolean, excludedWordsArray: type): String

Get initials of a string

public

Get last word of the text

public

prefix(str: *): *

Add prefix to a string

public

suffix(str: *): *

Add suffix to string

Static Public

public basename(): * source

import basename from 'fortext/functions/basename.js'

Get the basename of a path

Return:

*

public exists(str: *): [Boolean] source

import exists from 'fortext/functions/exists.js'

Check the existence of a string in the string

Params:

NameTypeAttributeDescription
str *

Return:

[Boolean]

existence of string

public firstWord(): string source

import firstWord from 'fortext/functions/firstWord.js'

Get first word from string

Return:

string

the first word

public howMany(search: string, isCaseSensitive: Boolean): int source

import howMany from 'fortext/functions/howMany.js'

How many occurrences of a string in another string

Params:

NameTypeAttributeDescription
search string

search string

isCaseSensitive Boolean
  • optional
  • default: false

determine the Case Sensitivity of search

Return:

int

number of occurrences

public initials(isInitialsCapital: Boolean, excludedWordsArray: type): String source

import initials from 'fortext/functions/initials.js'

Get initials of a string

Params:

NameTypeAttributeDescription
isInitialsCapital Boolean

return capital letters

excludedWordsArray type

ignore words in execludeWordsArray

Return:

String

initials of a string

public lastWord(): string source

import lastWord from 'fortext/functions/lastWord.js'

Get last word of the text

Return:

string

the last word

public prefix(str: *): * source

import prefix from 'fortext/functions/prefix.js'

Add prefix to a string

Params:

NameTypeAttributeDescription
str *

string

Return:

*

string

public suffix(str: *): * source

import suffix from 'fortext/functions/suffix.js'

Add suffix to string

Params:

NameTypeAttributeDescription
str *

string

Return:

*

string