Packages

package scala

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package encoding
  2. package i18n
  3. package io
  4. package parse
  5. package serialization
  6. package util

Type Members

  1. class KFException extends Exception

    WIP

  2. class UChar extends AnyRef

    Represents a Unicode character.

    Represents a Unicode character. Internally, it maintains both codepoint and UTF-8 representations. Conversion from native Char to UChar is provided implicitly.

    val ch: UChar = 'c'
    

  3. class UString extends AnyRef

    High-performance string with internal UTF-8 encoding.

    High-performance string with internal UTF-8 encoding. Conveniently use interpolator U to create instances of UString.

    val myString = U"This is my string"  // type of myString is UString
    

    Conversion from native String to UString is provided implicitly.

    val myString: UString = "This is my string"
    

    The philosophy behind this class is that, more often than not, text data is stored and read in UTF-8 encoding, and written to output with little or no processing. Most often such process can be done at byte level (such as concatenation), and in cases when iteration of code points is required, it can be done directly over the UTF-8 stream. By avoiding unnecessary encoding and decoding to and from UTF-8, unlike Java String, we can save our CPU resources. Also since UTF-8 is the most compact Unicode representation, we save some memory as well.

    Use toUtf8() to get raw bytes consisting this string, or if necessary use uCharIterator() to read each character one-by-one.

    getLength() returns the length of string in characters rather than bytes. To get the number of bytes use getUtf8Length(). substring() methods also work based on character (codepoint) location, as one would naturally expect.

Value Members

  1. object KFException extends Serializable
  2. object UChar
  3. object UString

Ungrouped