Package 

Class StringsKt

  • All Implemented Interfaces:

    
    public final class StringsKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static String eol
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final String getEol() Runtime specific end of line.
      final static String encodeToBase64(ByteArray $self) Encode the content of this byteArray to base64.
      final static String encodeToBase64(String $self) Encode this string to base64.
      final static ByteArray decodeBase64(String $self) Decode this base64 encoded string.
      final static String filterVars(String $self, Map<?, ?> parameters) Filter the target string substituting each key by its value.
      final static String filterVars(String $self, Pair<?, ?> parameters) Filter the target string substituting each key by its value.
      final static String filter(String $self, String prefix, String suffix, Pair<String, ?> parameters) TODO.
      final static <T extends Enum<?>> T toEnum(String $self, Function1<String, T> converter) TODO.
      final static <T extends Enum<?>> T toEnumOrNull(String $self, Function1<String, T> converter) TODO.
      final static <T extends Any> T toOrNull(String $self, KClass<T> type) TODO.
      final static List<MatchGroup> findGroups(Regex $self, String text) TODO.
      final static String snakeToCamel(String $self) Transform the target string from snake case to camel case.
      final static List<String> snakeToWords(String $self)
      final static String wordsToSnake(List<String> $self)
      final static List<String> camelToWords(String $self)
      final static String wordsToCamel(List<String> $self)
      final static String wordsToTitle(List<String> $self)
      final static String wordsToSentence(List<String> $self)
      final static String toWords(Enum<?> $self)
      final static String camelToSnake(String $self) Transform the target string from camel case to snake case.
      final static String banner(String $self, String bannerDelimiter) Format the string as a banner with a delimiter above and below text.
      final static String stripAnsi(String $self)
      final static String stripAccents(String $self) TODO.
      final static InputStream toStream(String $self) TODO.
      final static String utf8(Integer bytes) TODO.
      final static String prependIndent(String $self, Integer count, String pad) TODO.
      final static String toEnumValue(String $self)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getEol

         final String getEol()

        Runtime specific end of line.

      • encodeToBase64

         final static String encodeToBase64(ByteArray $self)

        Encode the content of this byteArray to base64.

      • encodeToBase64

         final static String encodeToBase64(String $self)

        Encode this string to base64.

      • decodeBase64

         final static ByteArray decodeBase64(String $self)

        Decode this base64 encoded string.

      • filterVars

         final static String filterVars(String $self, Map<?, ?> parameters)

        Filter the target string substituting each key by its value. The keys format resembles Mustache's one: {{key}} and all occurrences are replaced by the supplied value.

        If a variable does not have a parameter, it is left as it is.

        Parameters:
        parameters - The map with the list of key/value tuples.
      • filterVars

         final static String filterVars(String $self, Pair<?, ?> parameters)

        Filter the target string substituting each key by its value. The keys format resembles Mustache's one: {{key}} and all occurrences are replaced by the supplied value.

        If a variable does not have a parameter, it is left as it is.

        Parameters:
        parameters - vararg of key/value pairs.
      • filter

         final static String filter(String $self, String prefix, String suffix, Pair<String, ?> parameters)
        Parameters:
        prefix - .
        suffix - .
        parameters - .
      • toEnum

         final static <T extends Enum<?>> T toEnum(String $self, Function1<String, T> converter)
        Parameters:
        converter - .
      • toEnumOrNull

         final static <T extends Enum<?>> T toEnumOrNull(String $self, Function1<String, T> converter)
        Parameters:
        converter - .
      • toOrNull

         final static <T extends Any> T toOrNull(String $self, KClass<T> type)
        Parameters:
        type - .
      • findGroups

         final static List<MatchGroup> findGroups(Regex $self, String text)
        Parameters:
        text - .
      • snakeToCamel

         final static String snakeToCamel(String $self)

        Transform the target string from snake case to camel case.

      • snakeToWords

         final static List<String> snakeToWords(String $self)
      • wordsToSnake

         final static String wordsToSnake(List<String> $self)
      • camelToWords

         final static List<String> camelToWords(String $self)
      • wordsToCamel

         final static String wordsToCamel(List<String> $self)
      • wordsToTitle

         final static String wordsToTitle(List<String> $self)
      • toWords

         final static String toWords(Enum<?> $self)
      • camelToSnake

         final static String camelToSnake(String $self)

        Transform the target string from camel case to snake case.

      • banner

         final static String banner(String $self, String bannerDelimiter)

        Format the string as a banner with a delimiter above and below text. The character used to render the delimiter is defined.

        Parameters:
        bannerDelimiter - Delimiter char for banners.
      • stripAnsi

         final static String stripAnsi(String $self)
      • toStream

         final static InputStream toStream(String $self)
      • utf8

         final static String utf8(Integer bytes)
        Parameters:
        bytes - .
      • prependIndent

         final static String prependIndent(String $self, Integer count, String pad)
        Parameters:
        count - .
        pad - .
      • toEnumValue

         final static String toEnumValue(String $self)