Module fortschritt

Class TextUtils


  • public class TextUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      TextUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String substringAfter​(java.lang.String string, java.lang.String delimiter)
      Returns the substring after the first occurrence of a delimiter.
      static java.lang.String substringBefore​(java.lang.String string, java.lang.String delimiter)
      Returns the substring before the first occurrence of a delimiter.
      • Methods inherited from class java.lang.Object

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

      • TextUtils

        public TextUtils()
    • Method Detail

      • substringBefore

        public static java.lang.String substringBefore​(java.lang.String string,
                                                       java.lang.String delimiter)
        Returns the substring before the first occurrence of a delimiter. The delimiter is not part of the result.
        Parameters:
        string - String to get a substring from.
        delimiter - String to search for.
        Returns:
        Substring before the first occurrence of the delimiter.
      • substringAfter

        public static java.lang.String substringAfter​(java.lang.String string,
                                                      java.lang.String delimiter)
        Returns the substring after the first occurrence of a delimiter. The delimiter is not part of the result.
        Parameters:
        string - String to get a substring from.
        delimiter - String to search for.
        Returns:
        Substring after the last occurrence of the delimiter.