Trait/Object

scala.scalajs.js

JSStringOps

Related Docs: object JSStringOps | package js

Permalink

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
@RawJSType() @native()
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

Value Members

  1. final def !=(arg0: scala.Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    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)

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def ensuring(cond: (JSStringOps) ⇒ Boolean, msg: ⇒ scala.Any): JSStringOps

    Permalink
    Implicit information
    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

    Permalink
    Implicit information
    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

    Permalink
    Implicit information
    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

    Permalink
    Implicit information
    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

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: scala.Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    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[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def jsIndexOf(searchString: String): Int

    Permalink
    Annotations
    @JSName( name = "indexOf" )
  20. def jsIndexOf(searchString: String, position: Int): Int

    Permalink

    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" )
  21. def jsLastIndexOf(searchString: String): Int

    Permalink
    Annotations
    @JSName( name = "lastIndexOf" )
  22. def jsLastIndexOf(searchString: String, position: Int): Int

    Permalink

    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" )
  23. def jsReplace(searchValue: RegExp, replaceValue: Any): String

    Permalink
    Annotations
    @JSName( name = "replace" )
  24. def jsReplace(searchValue: RegExp, replaceValue: String): String

    Permalink
    Annotations
    @JSName( name = "replace" )
  25. def jsReplace(searchValue: String, replaceValue: Any): String

    Permalink
    Annotations
    @JSName( name = "replace" )
  26. def jsReplace(searchValue: String, replaceValue: String): String

    Permalink

    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" )
  27. def jsSlice(start: Int): String

    Permalink
    Annotations
    @JSName( name = "slice" )
  28. def jsSlice(start: Int, end: Int): String

    Permalink

    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" )
  29. def jsSplit(separator: RegExp): Array[String]

    Permalink
    Annotations
    @JSName( name = "split" )
  30. def jsSplit(separator: RegExp, limit: Int): Array[String]

    Permalink
    Annotations
    @JSName( name = "split" )
  31. def jsSplit(separator: String): Array[String]

    Permalink
    Annotations
    @JSName( name = "split" )
  32. def jsSplit(separator: String, limit: Int): Array[String]

    Permalink

    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" )
  33. def jsSubstring(start: Int): String

    Permalink
    Annotations
    @JSName( name = "substring" )
  34. def jsSubstring(start: Int, end: Int): String

    Permalink

    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" )
  35. def localeCompare(that: String): Int

    Permalink

    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

  36. def match(regexp: RegExp): Array[String]

    Permalink
  37. def match(regexp: String): Array[String]

    Permalink

    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

  38. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  39. def normalize(form: UnicodeNormalizationForm = UnicodeNormalizationForm.NFC): String

    Permalink

    ECMAScript 6 Returns the Unicode Normalization Form of this string.

    ECMAScript 6 Returns the Unicode Normalization Form of this string.

  40. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  41. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  42. def search(regexp: RegExp): Int

    Permalink
  43. def search(regexp: String): Int

    Permalink

    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

  44. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  45. def toLocaleLowerCase(): String

    Permalink

    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

  46. def toLocaleUpperCase(): String

    Permalink

    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

  47. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  48. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def [B](y: B): (JSStringOps, B)

    Permalink
    Implicit information
    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