org.dbpedia.extraction.util

RichString

class RichString extends AnyRef

Defines additional methods on strings, which are missing in the standard library.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RichString
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichString(str: String)

Value Members

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

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

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

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

    Definition Classes
    Any
  5. def capitalize(locale: Locale): String

    Converts the first character in this String to upper case using the rules of the given Locale.

    Converts the first character in this String to upper case using the rules of the given Locale. Does NOT convert the following chars at the start of the string: 'ß' -> "SS" 'fi' -> "FI" 'ff' -> "FF" 'fl' -> "FL" 'ffi' -> "FFI" 'ffl' -> "FFL" 'ſt' -> "ST" 'st' -> "ST"

    TODO: there are probably many other cases. Maybe we should use Character.toUpperCase() instead of String.toUpperCase()? What would MediaWiki do?

    locale

    The locale used to capitalize the String

  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  9. def escape(esc: Char, chars: String): String

    Return a copy of this string in which all occurrences of chars from the given string have been converted to UTF-8 hex representation where each two-digit hex byte is prefixed by the given escape character.

    Return a copy of this string in which all occurrences of chars from the given string have been converted to UTF-8 hex representation where each two-digit hex byte is prefixed by the given escape character.

    TODO: This method does not work for code points > 0xFFFF.

    chars

    list of characters that should be escaped if they occur in the string.

    TODO: this method is pretty inefficient. It is usually used with the same chars all the time, so we should have an array containing their escaped values and use a lookup table.

  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. def replaceBy(pattern: Pattern, append: (StringBuilder, Matcher) ⇒ Unit): String

    Similar to java.lang.String.replaceAll() and scala.util.matching.Regex.replaceAllIn(), but the replacement can be chosen more flexibly and this method should be more efficient.

  18. def replaceChars(chars: String, replace: String): String

    return a copy of this string in which all occurrences of chars from the first string have been replaced by the corresponding char from the second string.

    return a copy of this string in which all occurrences of chars from the first string have been replaced by the corresponding char from the second string. If there is no corresponding char (i.e. the second string is shorter than the first one), the affected char is removed.

    TODO: This method does not work for code points > 0xFFFF.

    chars

    list of characters that should be replaced if they occur in the string.

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

    Definition Classes
    AnyRef
  20. def toCamelCase(splitAt: Regex, locale: Locale): String

    Converts this String to camel case.

    Converts this String to camel case. The first character is not changed.

    splitAt

    The regex used to split the string into words

    locale

    The locale used to capitalize the words

  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. def trimSplit(sep: String): Array[String]

    Split string on given character or whitespace, trim each part, remove empty parts

  23. def uncapitalize(locale: Locale): String

    Converts the first character in this String to lower case using the rules of the given Locale.

    Converts the first character in this String to lower case using the rules of the given Locale.

    locale

    The locale

  24. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped