Options
All
  • Public
  • Public/Protected
  • All
Menu

A class which provides some operations on String

export
class

Strings

Hierarchy

  • Strings

Index

Methods

Static capitalizeFirstLetter

  • capitalizeFirstLetter(value: string): string
  • Changes first character as uppercase character of the given value {string}

    Parameters

    • value: string

    Returns string

Static endsWith

  • endsWith(value: string, searchString: string, position?: number): boolean
  • Determines whether a string ends with the characters of another string, returning true or false as appropriate.

    Parameters

    • value: string
    • searchString: string
    • Optional position: number

    Returns boolean

Static forEach

  • forEach(value: string, callback: function): boolean
  • Provides to navigate in the given Object and can broken if return false from callback function.

    Parameters

    • value: string
    • callback: function
        • (c: string, index?: number): boolean | void
        • Parameters

          • c: string
          • Optional index: number

          Returns boolean | void

    Returns boolean

Static getLength

  • getLength(value: string): number
  • Gets length of the given value {string}.

    Parameters

    • value: string

    Returns number

Static has

  • has(src: string, index?: number): boolean
  • Checks the given array is exist or not or index is exist or not.

    Parameters

    • src: string
    • Optional index: number

    Returns boolean

Static lPad

  • lPad(value: string, pad: string, length: number): string
  • Puts the given pad {string} by (the given value minus the given length) from left side of the given value {string}

    Parameters

    • value: string
    • pad: string
    • length: number

    Returns string

Static lTrim

  • lTrim(value: string): string
  • Trims space from left side of the given value {string}

    Parameters

    • value: string

    Returns string

Static partsByNumber

  • partsByNumber(value: string, length: number): string[]
  • Splits the given value {string} by the given length as equals parts.

    Parameters

    • value: string
    • length: number

    Returns string[]

Static rPad

  • rPad(value: string, pad: string, length: number): string
  • Puts the given pad {string} by (the given value minus the given length) from right side of the given value {string}

    Parameters

    • value: string
    • pad: string
    • length: number

    Returns string

Static rTrim

  • rTrim(value: string): string
  • Trims space from right side of the given value {string}

    Parameters

    • value: string

    Returns string

Static replaceAll

  • replaceAll(value: string, search: string, replacement: string): string
  • Parameters

    • value: string
    • search: string
    • replacement: string

    Returns string

Static reverse

  • reverse(value: string): string

Static startsWith

  • startsWith(value: string, searchString: string, position?: number): boolean
  • Returns toString of the given value {string} Determines whether a string begins with the characters of another string, returning true or false as appropriate.

    Parameters

    • value: string
    • searchString: string
    • Optional position: number

    Returns boolean

Static template

  • template<P>(msg: string, params: P): string

Static toString

  • toString(value: string): string
  • Returns toString of the given value {string}

    Parameters

    • value: string

    Returns string

Static trim

  • trim(value: string): string
  • Trims space from both side of the given value {string}

    Parameters

    • value: string

    Returns string

Generated using TypeDoc