java.lang.Object
org.apache.velocity.util.StringUtils
com.weirddev.testme.intellij.template.context.StringUtils

public class StringUtils extends org.apache.velocity.util.StringUtils
General string handling method utils, typically used in test templates. Date: 26/11/2016
Author:
Yaron Yamin
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • capitalizeFirstLetter

      public static String capitalizeFirstLetter(String data)
      Returns:
      the input data string where first letter converted to upper case
    • deCapitalizeFirstLetter

      public static String deCapitalizeFirstLetter(String data)
      Returns:
      the input data string where first letter converted to lower case
    • camelCaseToWords

      public static String camelCaseToWords(String data)
      Parameters:
      data - string in camel case
      Returns:
      input string separated to word from camel case format
    • hasLine

      public static boolean hasLine(String multiLineText, String toFind)
      Parameters:
      multiLineText - text with possible new lines
      toFind - text to find
      Returns:
      true - if toFind exists in text lines ( doesn't span in multiple lines)
    • removeSuffix

      public static String removeSuffix(String str, String suffix)
      Parameters:
      str - input string, possibly containing input suffix
      suffix - possible suffix of input text
      Returns:
      input str without the suffix if indeed is a suffix of input str