final class StringOps extends AnyVal with IterableOps[Char] with SeqMonoTransforms[Char, String] with IterablePolyTransforms[Char, List] with Buildable[Char, String] with ArrayLike[Char]
- Alphabetic
- By Inheritance
- StringOps
- ArrayLike
- Buildable
- IterablePolyTransforms
- SeqMonoTransforms
- IterableMonoTransforms
- IterableOps
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StringOps(s: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
def
++(xs: String): String
Another overloaded version of
++. -
def
++(xs: IterableOnce[Char]): String
Overloaded version of
++that gives back a string, where the inherited version gives back a sequence. -
def
++[B >: Char](xs: IterableOnce[B]): List[B]
Concatenation
Concatenation
- Definition Classes
- IterablePolyTransforms
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
- def apply(i: Int): Char
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
className: String
The class name of this collection.
The class name of this collection. To be used for converting to string. Collections generally print like this:
<className>(elem_1, ..., elem_n)
- Definition Classes
- StringOps → IterableOps
-
def
coll: StringView
- Attributes
- protected
- Definition Classes
- StringOps → IterablePolyTransforms → IterableMonoTransforms → IterableOps
-
def
copyToArray[B >: Char](xs: Array[B], start: Int = 0): xs.type
Copy all elements of this collection to array
xs, starting atstart.Copy all elements of this collection to array
xs, starting atstart.- Definition Classes
- IterableOps
-
def
drop(n: Int): String
The rest of the collection without its
nfirst elements.The rest of the collection without its
nfirst elements. For linear, immutable collections this should avoid making a copy.- Definition Classes
- IterableMonoTransforms
-
def
filter(p: (Char) ⇒ Boolean): String
All elements satisfying predicate
pAll elements satisfying predicate
p- Definition Classes
- IterableMonoTransforms
-
def
flatMap(f: (Char) ⇒ String): String
Overloaded version of
flatMapthat gives back a string, where the inherited version gives back a sequence. -
def
flatMap[B](f: (Char) ⇒ IterableOnce[B]): List[B]
Flatmap
Flatmap
- Definition Classes
- IterablePolyTransforms
-
def
foldLeft[B](z: B)(op: (B, Char) ⇒ B): B
Fold left
Fold left
- Definition Classes
- IterableOps
-
def
foldRight[B](z: B)(op: (Char, B) ⇒ B): B
Fold right
Fold right
- Definition Classes
- IterableOps
-
def
foreach[U](f: (Char) ⇒ U): Unit
Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.Apply
fto each element for its side effects Note: [U] parameter needed to help scalac's type inference.- Definition Classes
- IterableOps
-
def
fromIterable[B](coll: Iterable[B]): List[B]
- Definition Classes
- StringOps → IterablePolyTransforms
-
def
fromIterableWithSameElemType(coll: Iterable[Char]): String
- Attributes
- protected
- Definition Classes
- StringOps → IterableMonoTransforms
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
head: Char
The first element of the collection.
The first element of the collection.
- Definition Classes
- IterableOps
-
def
indexWhere(p: (Char) ⇒ Boolean): Int
The index of the first element in this collection for which
pholds.The index of the first element in this collection for which
pholds.- Definition Classes
- IterableOps
-
def
isEmpty: Boolean
Is the collection empty?
Is the collection empty?
- Definition Classes
- IterableOps
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator(): Iterator[Char]
-
def
knownSize: Int
The number of elements in this collection, if it can be cheaply computed, -1 otherwise.
The number of elements in this collection, if it can be cheaply computed, -1 otherwise. Cheaply usually means: Not requiring a collection traversal.
- Definition Classes
- StringOps → IterableOps
- def length: Int
-
def
map(f: (Char) ⇒ Char): String
Overloaded version of
mapthat gives back a string, where the inherited version gives back a sequence. -
def
map[B](f: (Char) ⇒ B): List[B]
Map
Map
- Definition Classes
- IterablePolyTransforms
-
def
mkString(sep: String): String
A string showing all elements of this collection, separated by string
sep.A string showing all elements of this collection, separated by string
sep.- Definition Classes
- IterableOps
-
def
newBuilder: StringBuilder
Creates a new builder.
-
def
nonEmpty: Boolean
Is the collection not empty?
Is the collection not empty?
- Definition Classes
- IterableOps
-
def
partition(p: (Char) ⇒ Boolean): (String, String)
Optimized, push-based version of
partition.Optimized, push-based version of
partition.- Definition Classes
- Buildable → IterableMonoTransforms
-
def
reverse: String
- Definition Classes
- SeqMonoTransforms
- val s: String
-
def
size: Int
The number of elements in this collection.
The number of elements in this collection. Does not terminate for infinite collections.
- Definition Classes
- IterableOps
-
def
tail: String
The rest of the collection without its first element.
The rest of the collection without its first element.
- Definition Classes
- IterableMonoTransforms
-
def
take(n: Int): String
A collection containing the first
nelements of this collection.A collection containing the first
nelements of this collection.- Definition Classes
- IterableMonoTransforms
-
def
to[C[X] <: Iterable[X]](fi: FromIterable[C]): C[Char]
Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A].Given a collection factory
fifor collections of type constructorC, convert this collection to one of typeC[A]. Example uses:xs.to(List) xs.to(ArrayBuffer)
- Definition Classes
- IterableOps
-
def
toArray[B >: Char](implicit arg0: ClassTag[B]): Array[B]
Convert collection to array.
Convert collection to array.
- Definition Classes
- IterableOps
-
def
toString(): String
- Definition Classes
- IterableOps → Any
-
def
view: View[Char]
A view representing the elements of this collection.
A view representing the elements of this collection.
- Definition Classes
- IterableOps
-
def
zip[B](xs: IterableOnce[B]): List[(Char, B)]
Zip.
Zip. Interesting because it requires to align to source collections.
- Definition Classes
- IterablePolyTransforms