Options
All
  • Public
  • Public/Protected
  • All
Menu

Module string

Functions

stringClearReferences

  • stringClearReferences(text: string): string
  • Parameters

    • text: string

    Returns string

stringFindMatch

  • stringFindMatch(needle: string, haystack: string[]): object
  • Parameters

    • needle: string
    • haystack: string[]

    Returns object

    • bestMatch: string
    • bestMatchIndex: number
    • ratings: object[]

stringFindSimilarity

  • stringFindSimilarity(alpha: string, beta: string): number
  • Parameters

    • alpha: string
    • beta: string

    Returns number

stringFindSub

  • stringFindSub(text?: string, begin?: number, end?: number): string
  • Returns a section of a string.

    Parameters

    • text: string = ""
    • begin: number = 0
    • Optional end: number

    Returns string

stringGetCount

  • stringGetCount(text: string): number
  • name

    stringGetCount

    description

    Get count of symbols in text. This is not string length.

    Parameters

    • text: string

      The string being measured for length.

    Returns number

stringIsComparable

  • stringIsComparable(first: string, second: string, isStrict?: boolean): boolean
  • Compare two strings

    Parameters

    • first: string
    • second: string
    • isStrict: boolean = false

    Returns boolean

stringIsContain

  • stringIsContain(haystack: string, needle: string, isStrict?: boolean): boolean
  • Perform search in string

    Parameters

    • haystack: string
    • needle: string
    • isStrict: boolean = false

    Returns boolean

stringIsSimilar

  • stringIsSimilar(alpha: string, beta: string, minRating?: number): boolean
  • Finds degree of similarity between two strings using Sørensen–Dice coefficient

    Parameters

    • alpha: string
    • beta: string
    • minRating: number = 0.85

    Returns boolean

stringMakeEscaped

  • stringMakeEscaped(text: string): string
  • Parameters

    • text: string

    Returns string

stringMakeReversed

  • stringMakeReversed(text: string): string
  • name

    stringMakeReversed

    description

    Reverse string

    since

    0.1.32

    Parameters

    • text: string

    Returns string

    Reversed string

Generated using TypeDoc