Functions
All
-
Type parameters
Parameters
Returns boolean
Any
-
Type parameters
Parameters
Returns boolean
CapitalizeSentences
- CapitalizeSentences(sentences: string): string
-
Parameters
Returns string
CapitalizeWords
- CapitalizeWords(str: string): string
-
Parameters
Returns string
CharactersCount
- CharactersCount(str: string, ...characters: string[]): number
-
Parameters
-
str: string
-
Rest ...characters: string[]
Returns number
CloneArray
- CloneArray<T>(array: T[]): T[]
-
Type parameters
Parameters
Returns T[]
ContainsSubstringOnlyOnce
- ContainsSubstringOnlyOnce(str: string, ...substrings: string[]): boolean
-
Parameters
-
str: string
-
Rest ...substrings: string[]
Returns boolean
Distinct
- Distinct<T>(val: string | T[]): string | T[]
-
Type parameters
Parameters
Returns string | T[]
FileSize
- FileSize(bytes: number, baseOn1024?: boolean): string
-
Parameters
-
bytes: number
-
baseOn1024: boolean = false
Returns string
First
- First<T>(array: T[]): undefined | T
-
Type parameters
Parameters
Returns undefined | T
FormatString
- FormatString(format: string, ...args: (string | number)[]): string
-
Parameters
-
format: string
-
Rest ...args: (string | number)[]
Returns string
GetBaseLog
- GetBaseLog(num: number, baseNumber: number): number
-
Parameters
-
num: number
-
baseNumber: number
Returns number
GetIndent
- GetIndent(str: string): string
-
Parameters
Returns string
GetLeadingNumber
- GetLeadingNumber(str: string, float?: boolean): string
-
Parameters
-
str: string
-
float: boolean = false
Returns string
GetSubstring
-
Parameters
Returns string
IsEmpty
- IsEmpty<T>(val: string | T[] | undefined): boolean
-
Type parameters
Parameters
-
val: string | T[] | undefined
Returns boolean
IsEqual
- IsEqual(a?: string, b?: string, ignoreCase?: boolean): boolean
-
Parameters
-
Optional a: string
-
Optional b: string
-
ignoreCase: boolean = true
Returns boolean
IsNotEmpty
- IsNotEmpty<T>(val: string | T[] | undefined): boolean
-
Type parameters
Parameters
-
val: string | T[] | undefined
Returns boolean
IsString
- IsString(val: any): boolean
-
Parameters
Returns boolean
Last
- Last<T>(array: T[]): undefined | T
-
Type parameters
Parameters
Returns undefined | T
LeftRotate
- LeftRotate(num: number, n: number, bits?: number): number
-
Parameters
-
num: number
-
n: number
-
Optional bits: number
Returns number
Mod
- Mod(num: number, n: number): number
-
Parameters
Returns number
OnlyContains
- OnlyContains(str: string, ...characters: string[]): boolean
-
Parameters
-
str: string
-
Rest ...characters: string[]
Returns boolean
ParseFileSize
- ParseFileSize(fileSize: string): number | undefined
-
Parameters
Returns number | undefined
Remove
- Remove<T>(array: T[], index: number): any[]
-
Type parameters
Parameters
Returns any[]
ReplaceAll
- ReplaceAll(str: string, old: string, rep: string): string
-
Parameters
-
str: string
-
old: string
-
rep: string
Returns string
ReplaceAt
- ReplaceAt(str: string, index: number, rep: string, length?: number): string
-
Parameters
-
str: string
-
index: number
-
rep: string
-
length: number = 1
Returns string
ReplaceAtPos
-
Parameters
Returns string
Reverse
- Reverse(str: string): string
-
Parameters
Returns string
RightRotate
- RightRotate(num: number, n: number, bits?: number): number
-
Parameters
-
num: number
-
n: number
-
Optional bits: number
Returns number
SequenceEqual
- SequenceEqual<T>(array: T[], second: T[]): boolean
-
Type parameters
Parameters
Returns boolean
Split
- Split<T>(array: T[], size: number, fromLeft?: boolean): T[][]
-
Type parameters
Parameters
-
array: T[]
-
size: number
-
Optional fromLeft: boolean
Returns T[][]
SplitByN
- SplitByN(str: string, n: number, fromLeft?: boolean): string[]
-
Parameters
-
str: string
-
n: number
-
Optional fromLeft: boolean
Returns string[]
Swap32
- Swap32(n: number): number
-
Parameters
Returns number
ToArray
- ToArray(str: string): string[]
-
Parameters
Returns string[]
ToDays
- ToDays(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToHEX
- ToHEX(...array: number[]): string
-
Parameters
Returns string
ToHours
- ToHours(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToMilliseconds
- ToMilliseconds(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToMinutes
- ToMinutes(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToMonths
- ToMonths(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToSeconds
- ToSeconds(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToUInt32
- ToUInt32(n: number): number
-
Parameters
Returns number
ToUTF8ByteArray
- ToUTF8ByteArray(str: string): number[]
-
Parameters
Returns number[]
ToWeeks
- ToWeeks(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
ToYears
- ToYears(num: number, currentUnit: TimeUnit): number
-
Parameters
Returns number
TrimAll
- TrimAll(str: string, trimString: string): string
- TrimAll(str: string, trimString: string, max: number): string
- TrimAll(str: string, trimStrings: string[]): string
-
Parameters
-
str: string
-
trimString: string
Returns string
-
Parameters
-
str: string
-
trimString: string
-
max: number
Returns string
-
Parameters
-
str: string
-
trimStrings: string[]
Returns string
TrimEnd
- TrimEnd(str: string, trimString: string): string
- TrimEnd(str: string, trimString: string, max: number): string
- TrimEnd(str: string, trimStrings: string[]): string
- TrimEnd(str: string, trimStrings: string[], trimAll: boolean): string
-
Parameters
-
str: string
-
trimString: string
Returns string
-
Parameters
-
str: string
-
trimString: string
-
max: number
Returns string
-
Parameters
-
str: string
-
trimStrings: string[]
Returns string
-
Parameters
-
str: string
-
trimStrings: string[]
-
trimAll: boolean
Returns string
TrimStart
- TrimStart(str: string, trimString: string): string
- TrimStart(str: string, trimString: string, max: number): string
- TrimStart(str: string, trimStrings: string[]): string
- TrimStart(str: string, trimStrings: string[], trimAll: boolean): string
-
Parameters
-
str: string
-
trimString: string
Returns string
-
Parameters
-
str: string
-
trimString: string
-
max: number
Returns string
-
Parameters
-
str: string
-
trimStrings: string[]
Returns string
-
Parameters
-
str: string
-
trimStrings: string[]
-
trimAll: boolean
Returns string
UTF8Encode
- UTF8Encode(str: string): string
-
Parameters
Returns string
padStart
- padStart(str: string, targetLength: number, padString: string): string
-
Parameters
-
str: string
-
targetLength: number
-
padString: string
Returns string
Simple clone array
2.0.2
2020-01-11