Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • String

Index

Constructors

constructor

Accessors

length

  • get length(): number
  • Returns a length of given string.

    Returns number

Methods

charAt

  • charAt(position: number): string
  • Returns character at selected position of given string*.

    Parameters

    • position: number

    Returns string

concat

  • concat(): string
  • Allows to join two *strings together, works in same manner as binary expression.

    Returns string

endsWith

  • endsWith(text: any): boolean
  • Returns whenever given string ends with the characters of a specified text.

    Parameters

    • text: any

    Returns boolean

includes

  • includes(text: any, startIndex: number): boolean
  • Returns whenever given string contains characters of a specified text.

    Parameters

    • text: any
    • startIndex: number

    Returns boolean

indexOf

  • indexOf(text: any, startIndex: number): number
  • Returns position of the first occurrence of a specified text* in selected string.

    Parameters

    • text: any
    • startIndex: number

    Returns number

lastIndexOf

  • lastIndexOf(text: any, startIndex: number): number
  • lastIndexOf(text: any): number
  • Returns position of the last occurrence of a specified text in selected string.

    Parameters

    • text: any
    • startIndex: number

    Returns number

  • Returns position of the last occurrence of a specified text in selected string.

    Parameters

    • text: any

    Returns number

replace

  • replace(searchValue: any, newValue: any): string
  • Returns a new string where the search value is replaced with the new value.

    Parameters

    • searchValue: any
    • newValue: any

    Returns string

split

  • split(separator: any): string[]
  • Splits string into an array with a separator.

    Parameters

    • separator: any

    Returns string[]

startsWith

  • startsWith(text: any): boolean
  • Returns whenever given string* begins with the characters of a specified text.

    Parameters

    • text: any

    Returns boolean

substr

  • substr(start: number, length: number): string
  • Returns new string* of given length extracted from source text.

    Parameters

    • start: number
    • length: number

    Returns string

substring

  • substring(start: number, end: number): string
  • substring(start: number): string
  • Returns new string extracted from source text within the given range.

    Parameters

    • start: number
    • end: number

    Returns string

  • Returns new string extracted from given start position until the end of source text.

    Parameters

    • start: number

    Returns string

toLowerCase

  • toLowerCase(): string
  • Changes all the characters of the string to lower case.

    Returns string

toUpperCase

  • toUpperCase(): string
  • Changes all the characters of the string to upper case.

    Returns string

trim

  • trim(): string
  • Remove whitespace from both sides of a string.

    Returns string

Generated using TypeDoc