Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "string-utils"

Index

Functions

contains

  • contains(x: string, y: string): boolean
  • Checks if the string @param x contains the string @param y without being case sensitive.

    Parameters

    • x: string
    • y: string

    Returns boolean

createGuid

  • createGuid(): string
  • Returns string

    a random guid. Uses bitwise calculations.

isNotNullorEmpty

  • isNotNullorEmpty(val: any): boolean
  • Checks any value for null, undefined or '', but returns true for false etc.

    Can be used in querylanguages like Odata to safecheck a valid value for a filter.

    It IS NOT meant to be used with objects or arrays

    Parameters

    • val: any

      The value to safec heck

    Returns boolean

pascalCase

  • pascalCase(value: string): string
  • Converts a string to pascalCase

    Parameters

    • value: string

      The string to convert

    Returns string

    The string as pascal or an empty string if null

trimString

  • trimString(s: string, count?: number): string
  • Removes the @param count from @param s, starting from the end of the string. Uses the substr() method.

    Parameters

    • s: string
    • Default value count: number = 1

    Returns string

Generated using TypeDoc