• Effekt Logo Effekt Library
    • string
      • substring
      • substring
      • isSubstringAt
      • startsWith
      • endsWith
      • repeat
      • padLeft
      • padRight
      • split
      • join
      • trim
      • toBool
      • toInt
      • toInt
      • unsafeToInt
      • indexOf
      • indexOf
      • lastIndexOf
      • lastIndexOf
      • charAt
      • unsafeCharAt
    • string
    • Jump to source: libraries/common/string.effekt
      Example usage: examples/stdlib/string
      • substring (str: String, from: Int, to: Int): String / {}
      • substring (str: String, from: Int): String / {}
      • isSubstringAt (str: String, prefix: String, from: Int): Bool / {}
      • Checks whether str starts with the given prefix at `from`
      • startsWith (str: String, prefix: String): Bool / {}
      • endsWith (str: String, suffix: String): Bool / {}
      • repeat (str: String, n: Int): String / {}
      • Repeats the given string n-times.
        
        TODO use a more efficient way of appending strings like a buffer
      • padLeft (str: String, n: Int): String / {}
      • Left-pad the given string with spaces
      • padRight (str: String, n: Int): String / {}
      • Right-pad the given string with spaces
      • split (str: String, sep: String): List[String] / {}
      • join (strings: List[String], sep: String): String / {}
      • trim (str: String): String / {}
      • toBool (s: String): Bool / {Exception[WrongFormat]}
      • toInt (str: String): Int / {Exception[WrongFormat]}
      • toInt (str: String, base: Int): Int / {Exception[WrongFormat]}
      • unsafeToInt (str: String): Int / {}
      • Native versions of toInt (unused right now)
      • indexOf (str: String, sub: String): Option[Int] / {}
      • Returns the index of the first occurrence of `sub` in `str`
      • indexOf (str: String, sub: String, from: Int): Option[Int] / {}
      • lastIndexOf (str: String, sub: String): Option[Int] / {}
      • Returns the index of the last occurence of `sub` in `str`
      • lastIndexOf (str: String, sub: String, from: Int): Option[Int] / {}
      • charAt (str: String, index: Int): Char / {Exception[OutOfBounds]}
      • unsafeCharAt (str: String, n: Int): Char / {}