Packages

trait JSStringOps extends Any

Operations on JavaScript strings.

The methods with an equivalent signature in String but with a different meaning are prefixed by js in this trait.

Annotations
@JSType()
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. JSStringOps
  2. Any
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def jsIndexOf(searchString: String): Int
    Annotations
    @JSName( name = "indexOf" )
  2. abstract def jsIndexOf(searchString: String, position: Int): Int

    Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex,

    Returns the index within the calling String object of the first occurrence of the specified value, starting the search at fromIndex,

    returns -1 if the value is not found.

    MDN

    Annotations
    @JSName( name = "indexOf" )
  3. abstract def jsLastIndexOf(searchString: String): Int
    Annotations
    @JSName( name = "lastIndexOf" )
  4. abstract def jsLastIndexOf(searchString: String, position: Int): Int

    Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found.

    Returns the index within the calling String object of the last occurrence of the specified value, or -1 if not found. The calling string is searched backward, starting at fromIndex.

    MDN

    Annotations
    @JSName( name = "lastIndexOf" )
  5. abstract def jsReplace(searchValue: RegExp, replaceValue: Any): String
    Annotations
    @JSName( name = "replace" )
  6. abstract def jsReplace(searchValue: RegExp, replaceValue: String): String
    Annotations
    @JSName( name = "replace" )
  7. abstract def jsReplace(searchValue: String, replaceValue: Any): String
    Annotations
    @JSName( name = "replace" )
  8. abstract def jsReplace(searchValue: String, replaceValue: String): String

    Returns a new string with some or all matches of a pattern replaced by a replacement.

    Returns a new string with some or all matches of a pattern replaced by a replacement. The pattern can be a string or a RegExp, and the replacement can be a string or a function to be called for each match.

    This method does not change the String object it is called on. It simply returns a new string.

    To perform a global search and replace, either include the g switch in the regular expression or if the first parameter is a string, include g in the flags parameter.

    MDN

    Annotations
    @JSName( name = "replace" )
  9. abstract def jsSlice(start: Int): String
    Annotations
    @JSName( name = "slice" )
  10. abstract def jsSlice(start: Int, end: Int): String

    slice extracts the text from one string and returns a new string.

    slice extracts the text from one string and returns a new string. Changes to the text in one string do not affect the other string.

    slice extracts up to but not including endSlice. string.slice(1,4) extracts the second character through the fourth character (characters indexed 1, 2, and 3).

    As an example, string.slice(2,-1) extracts the third character through the second to last character in the string.

    MDN

    Annotations
    @JSName( name = "slice" )
  11. abstract def jsSplit(separator: RegExp): Array[String]
    Annotations
    @JSName( name = "split" )
  12. abstract def jsSplit(separator: RegExp, limit: Int): Array[String]
    Annotations
    @JSName( name = "split" )
  13. abstract def jsSplit(separator: String): Array[String]
    Annotations
    @JSName( name = "split" )
  14. abstract def jsSplit(separator: String, limit: Int): Array[String]

    Splits a String object into an array of strings by separating the string into substrings.

    Splits a String object into an array of strings by separating the string into substrings.

    When found, separator is removed from the string and the substrings are returned in an array. If separator is omitted, the array contains one element consisting of the entire string. If separator is an empty string, string is converted to an array of characters.

    If separator is a regular expression that contains capturing parentheses, then each time separator is matched, the results (including any undefined results) of the capturing parentheses are spliced into the output array. However, not all browsers support this capability.

    Note: When the string is empty, split returns an array containing one empty string, rather than an empty array.

    MDN

    Annotations
    @JSName( name = "split" )
  15. abstract def jsSubstring(start: Int): String
    Annotations
    @JSName( name = "substring" )
  16. abstract def jsSubstring(start: Int, end: Int): String

    Returns a subset of a string between one index and another, or through the end of the string.

    Returns a subset of a string between one index and another, or through the end of the string.

    MDN

    Annotations
    @JSName( name = "substring" )
  17. abstract def localeCompare(that: String): Int

    Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order.

    Returns a number indicating whether a reference string comes before or after or is the same as the given string in sort order. The new locales and options arguments let applications specify the language whose sort order should be used and customize the behavior of the function. In older implementations, which ignore the locales and options arguments, the locale and sort order used are entirely implementation dependent.

    MDN

  18. abstract def match(regexp: RegExp): Array[String]
  19. abstract def match(regexp: String): Array[String]

    Used to retrieve the matches when matching a string against a regular expression.

    Used to retrieve the matches when matching a string against a regular expression.

    If the regular expression does not include the g flag, returns the same result as regexp.exec(string). The returned Array has an extra input property, which contains the original string that was parsed. In addition, it has an index property, which represents the zero-based index of the match in the string.

    If the regular expression includes the g flag, the method returns an Array containing all matches. If there were no matches, the method returns null.

    MDN

  20. abstract def normalize(): String

    ECMAScript 6 Returns the Unicode Normalization Form of this string, with the NFC form.

  21. abstract def normalize(form: UnicodeNormalizationForm): String

    ECMAScript 6 Returns the Unicode Normalization Form of this string.

  22. abstract def search(regexp: RegExp): Int
  23. abstract def search(regexp: String): Int

    If successful, search returns the index of the regular expression inside the string.

    If successful, search returns the index of the regular expression inside the string. Otherwise, it returns -1.

    When you want to know whether a pattern is found in a string use search (similar to the regular expression test method); for more information (but slower execution) use match (similar to the regular expression exec method).

    MDN

  24. abstract def toLocaleLowerCase(): String

    The toLocaleLowerCase method returns the value of the string converted to lower case according to any locale-specific case mappings.

    The toLocaleLowerCase method returns the value of the string converted to lower case according to any locale-specific case mappings. toLocaleLowerCase does not affect the value of the string itself. In most cases, this will produce the same result as toLowerCase(), but for some locales, such as Turkish, whose case mappings do not follow the default case mappings in Unicode, there may be a different result.

    MDN

  25. abstract def toLocaleUpperCase(): String

    The toLocaleUpperCase method returns the value of the string converted to upper case according to any locale-specific case mappings.

    The toLocaleUpperCase method returns the value of the string converted to upper case according to any locale-specific case mappings. toLocaleUpperCase does not affect the value of the string itself. In most cases, this will produce the same result as toUpperCase(), but for some locales, such as Turkish, whose case mappings do not follow the default case mappings in Unicode, there may be a different result.

    MDN

Concrete Value Members

  1. final def !=(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from JSStringOps to any2stringadd[JSStringOps] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (JSStringOps, B)
    Implicit
    This member is added by an implicit conversion from JSStringOps to ArrowAssoc[JSStringOps] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  8. def ensuring(cond: (JSStringOps) ⇒ Boolean, msg: ⇒ scala.Any): JSStringOps
    Implicit
    This member is added by an implicit conversion from JSStringOps to Ensuring[JSStringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  9. def ensuring(cond: (JSStringOps) ⇒ Boolean): JSStringOps
    Implicit
    This member is added by an implicit conversion from JSStringOps to Ensuring[JSStringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: Boolean, msg: ⇒ scala.Any): JSStringOps
    Implicit
    This member is added by an implicit conversion from JSStringOps to Ensuring[JSStringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean): JSStringOps
    Implicit
    This member is added by an implicit conversion from JSStringOps to Ensuring[JSStringOps] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. def equals(arg0: scala.Any): Boolean
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from JSStringOps to StringFormat[JSStringOps] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  27. def [B](y: B): (JSStringOps, B)
    Implicit
    This member is added by an implicit conversion from JSStringOps to ArrowAssoc[JSStringOps] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Any

Inherited from AnyRef

Inherited from scala.Any

Inherited by implicit conversion any2stringadd from JSStringOps to any2stringadd[JSStringOps]

Inherited by implicit conversion StringFormat from JSStringOps to StringFormat[JSStringOps]

Inherited by implicit conversion Ensuring from JSStringOps to Ensuring[JSStringOps]

Inherited by implicit conversion ArrowAssoc from JSStringOps to ArrowAssoc[JSStringOps]

Ungrouped