Options
All
  • Public
  • Public/Protected
  • All
Menu

Module addPrefix

Index

References

Functions String

References

Renames and re-exports addPrefix

String Functions

  • addPrefix(str?: string, prefix?: string): string
  • add prefix to string

    since

    5.14.0

    see

    addSuffix

    addPrefix("123456", "123")
    // => '123456'
    addPrefix("456", "123")
    // => '123456'

    Parameters

    • str: string = ""

      to be processed string

    • prefix: string = ""

      prefix string

    Returns string