Char

scala.Char
See theChar companion class
object Char

Attributes

Companion
class
Source
Char.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Char.type

Members list

Value members

Concrete methods

def box(x: Char): Character

Transforms a value type into a boxed reference type.

Transforms a value type into a boxed reference type.

Runtime implementation determined by scala.runtime.BoxesRunTime.boxToCharacter. See src/library/scala/runtime/BoxesRunTime.java.

Value parameters

x

the Char to be boxed

Attributes

Returns

a java.lang.Character offering x as its underlying value.

Source
Char.scala
override def toString(): String

The String representation of the scala.Char companion object.

The String representation of the scala.Char companion object.

Attributes

Definition Classes
Any
Source
Char.scala
def unbox(x: Object): Char

Transforms a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a java.lang.Character.

Transforms a boxed type into a value type. Note that this method is not typesafe: it accepts any Object, but will throw an exception if the argument is not a java.lang.Character.

Runtime implementation determined by scala.runtime.BoxesRunTime.unboxToChar. See src/library/scala/runtime/BoxesRunTime.java.

Value parameters

x

the java.lang.Character to be unboxed.

Attributes

Returns

the Char resulting from calling charValue() on x

Throws
ClassCastException

if the argument is not a java.lang.Character

Source
Char.scala

Concrete fields

final val MaxValue: '￿'

The largest value representable as a Char.

The largest value representable as a Char.

Attributes

Source
Char.scala
final val MinValue: '\u0000'

The smallest value representable as a Char.

The smallest value representable as a Char.

Attributes

Source
Char.scala

Extensions

Deprecated extensions

extension (self: Char)
def abs: Char

Returns the absolute value of this.

Returns the absolute value of this.

Attributes

Deprecated
[Since version 3.10.0] Char\'s are never negative; abs is redundant and can be removed
Source
Char.scala
def asDigit: Int

Attributes

Source
Char.scala
def compare(that: Char): Int

Compares this to that according to the standard total ordering.

Compares this to that according to the standard total ordering.

Returns:

  • a positive value if this > that
  • a negative value if this < that
  • 0 if this == that

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala
def getType: Int

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Returns true iff this is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

Returns true iff this is within the range of scala.Byte MinValue and MaxValue; otherwise returns false.

Attributes

Source
Char.scala

Returns true iff this is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

Returns true iff this is within the range of scala.Char MinValue and MaxValue; otherwise returns false.

Attributes

Deprecated
[Since version 3.10.0] isValidChar on Char is always true
Source
Char.scala

Returns true iff this is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

Returns true iff this is within the range of scala.Int MinValue and MaxValue; otherwise returns false.

Attributes

Deprecated
[Since version 3.10.0] isValidInt on Char is always true
Source
Char.scala

Returns true iff this is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

Returns true iff this is within the range of scala.Short MinValue and MaxValue; otherwise returns false.

Attributes

Source
Char.scala

Attributes

Source
Char.scala

Returns '''true''' if this number has no decimal component. Always '''true''' for RichInt.

Returns '''true''' if this number has no decimal component. Always '''true''' for RichInt.

Attributes

Deprecated
[Since version 2.12.15] isWhole on Char is always true
Source
Char.scala
def max(that: Char): Char

Returns this if this > that or that otherwise.

Returns this if this > that or that otherwise.

Attributes

Source
Char.scala
def min(that: Char): Char

Returns this if this < that or that otherwise.

Returns this if this < that or that otherwise.

Attributes

Source
Char.scala

Attributes

Source
Char.scala
def sign: Char

Returns the sign of this.

Returns the sign of this.

zero if the argument is zero, -zero if the argument is -zero, one if the argument is greater than zero, -one if the argument is less than zero, and NaN if the argument is NaN where applicable.

Attributes

Deprecated
[Since version 3.10.0] since Char\'s are never negative, compare to \'\\u0000\' instead
Source
Char.scala
def signum: Int

Returns the signum of this.

Returns the signum of this.

Attributes

Deprecated
[Since version 2.13.0] use `sign` method instead
Source
Char.scala
def to(end: Char): Inclusive[Char]

A scala.collection.immutable.NumericRange from this up to and including end.

A scala.collection.immutable.NumericRange from this up to and including end.

Value parameters

end

The final bound of the range to make.

Attributes

Source
Char.scala
def to(end: Char, step: Char): Inclusive[Char]

A scala.collection.immutable.NumericRange from this up to and including end.

A scala.collection.immutable.NumericRange from this up to and including end.

Value parameters

end

The final bound of the range to make.

step

The number to increase by for each step of the range.

Attributes

Source
Char.scala
def toLower: Char

Attributes

Source
Char.scala

Attributes

Source
Char.scala
def toUpper: Char

Attributes

Source
Char.scala
def until(end: Char): Exclusive[Char]

A scala.collection.immutable.NumericRange from this up to but not including end.

A scala.collection.immutable.NumericRange from this up to but not including end.

Value parameters

end

The final bound of the range to make.

Attributes

Source
Char.scala
def until(end: Char, step: Char): Exclusive[Char]

A scala.collection.immutable.NumericRange from this up to but not including end.

A scala.collection.immutable.NumericRange from this up to but not including end.

Value parameters

end

The final bound of the range to make.

step

The number to increase by for each step of the range.

Attributes

Source
Char.scala

Implicits

Implicits

implicit def char2double(x: Char): Double

Attributes

Source
Char.scala
implicit def char2float(x: Char): Float

Attributes

Source
Char.scala
implicit def char2int(x: Char): Int

Attributes

Source
Char.scala
implicit def char2long(x: Char): Long

Attributes

Source
Char.scala