Packages

final class StringSeqOps extends AnyVal

Annotations
@SuppressWarnings()
Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StringSeqOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringSeqOps(ss: Seq[String])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def commaAnd: String

    Format Seq[String] into a human-readable list using comma and the conjunction and.

    Format Seq[String] into a human-readable list using comma and the conjunction and. It separates elements by commas and uses the term and before the last element.

    Example:
    1. List.empty[String].commaAnd
      // String = ""
      
      List("").commaAnd
      // String = ""
      
      List("aaa").commaAnd
      // String = "aaa"
      
      List("aaa", "bbb").commaAnd
      // String = "aaa and bbb"
      
      List("aaa", "bbb", "ccc").commaAnd
      // String = "aaa, bbb and ccc"
      
      List("aaa", "bbb", "ccc", "ddd").commaAnd
      // String = "aaa, bbb, ccc and ddd"
  6. def commaOr: String

    Format Seq[String] into a human-readable list using comma and the conjunction or.

    Format Seq[String] into a human-readable list using comma and the conjunction or. It separates elements by commas and uses the term or before the last element.

    Example:
    1. List.empty[String].commaOr
      // String = ""
      
      List("").commaOr
      // String = ""
      
      List("aaa").commaOr
      // String = "aaa"
      
      List("aaa", "bbb").commaOr
      // String = "aaa or bbb"
      
      List("aaa", "bbb", "ccc").commaOr
      // String = "aaa, bbb or ccc"
      
      List("aaa", "bbb", "ccc", "ddd").commaOr
      // String = "aaa, bbb, ccc or ddd"
  7. def commaWith(conjunction: String): String

    Extension method for a Seq[String], providing a way to join the elements with a comma and a given conjunction.

    Extension method for a Seq[String], providing a way to join the elements with a comma and a given conjunction. It joins String values with commas and uses the given conjunction before the last element.

    Example:
    1. List.empty[String].commaWith("BLAH")
      // String = ""
      
      List("").commaWith("BLAH")
      // String = ""
      
      List("aaa").commaWith("BLAH")
      // String = "aaa"
      
      List("aaa", "bbb").commaWith("BLAH")
      // String = "aaa BLAH bbb"
      
      List("aaa", "bbb", "ccc").commaWith("BLAH")
      // String = "aaa, bbb BLAH ccc"
      
      List("aaa", "bbb", "ccc", "ddd").commaWith("BLAH")
      // String = "aaa, bbb, ccc BLAH ddd"
  8. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def serialCommaAnd: String

    Format Seq[String] into a human-readable list using comma and the conjunction and.

    Format Seq[String] into a human-readable list using comma and the conjunction and. It separates elements by commas and uses the term and before the last element following the "Oxford comma" style. e.g.) "aaa, bbb, and ccc".

    Example:
    1. List.empty[String].serialCommaAnd
      // String = ""
      
      List("").serialCommaAnd
      // String = ""
      
      List("aaa").serialCommaAnd
      // String = "aaa"
      
      List("aaa", "bbb").serialCommaAnd
      // String = "aaa and bbb"
      
      List("aaa", "bbb", "ccc").serialCommaAnd
      // String = "aaa, bbb, and ccc"
      
      List("aaa", "bbb", "ccc", "ddd").serialCommaAnd
      // String = "aaa, bbb, ccc, and ddd"
  11. def serialCommaOr: String

    Format Seq[String] into a human-readable list using comma and the conjunction or.

    Format Seq[String] into a human-readable list using comma and the conjunction or. It separates elements by commas and uses the term or before the last element following the "Oxford comma" style. e.g.) "aaa, bbb, or ccc".

    Example:
    1. List.empty[String].serialCommaOr
      // String = ""
      
      List("").serialCommaOr
      // String = ""
      
      List("aaa").serialCommaOr
      // String = "aaa"
      
      List("aaa", "bbb").serialCommaOr
      // String = "aaa or bbb"
      
      List("aaa", "bbb", "ccc").serialCommaOr
      // String = "aaa, bbb, or ccc"
      
      List("aaa", "bbb", "ccc", "ddd").serialCommaOr
      // String = "aaa, bbb, ccc, or ddd"
  12. def serialCommaWith(conjunction: String): String

    Extension method for a Seq[String], providing a way to join the elements with a serial comma and a given conjunction.

    Extension method for a Seq[String], providing a way to join the elements with a serial comma and a given conjunction.

    It joins String values with commas and uses the given conjunction before the last element.

    This method employs the serial comma (also known as the Oxford comma), which means it always inserts a comma before the conjunction unless there are only two elements.

    Annotations
    @SuppressWarnings()
    Example:
    1. List.empty[String].serialCommaWith("BLAH")
      // String = ""
      
      List("").serialCommaWith("BLAH")
      // String = ""
      
      List("aaa").serialCommaWith("BLAH")
      // String = "aaa"
      
      List("aaa", "bbb").serialCommaWith("BLAH")
      // String = "aaa BLAH bbb"
      
      List("aaa", "bbb", "ccc").serialCommaWith("BLAH")
      // String = "aaa, bbb, BLAH ccc"
      
      List("aaa", "bbb", "ccc", "ddd").serialCommaWith("BLAH")
      // String = "aaa, bbb, ccc, BLAH ddd"
  13. def toString(): String
    Definition Classes
    Any

Inherited from AnyVal

Inherited from Any

Ungrouped