Class StringUtils

java.lang.Object
jadx.core.utils.StringUtils

public class StringUtils extends Object
  • Field Details

  • Constructor Details

    • StringUtils

      public StringUtils(JadxArgs args)
  • Method Details

    • getInstance

      public static StringUtils getInstance()
    • getIntegerFormat

      public IntegerFormat getIntegerFormat()
    • visitCodePoints

      public static void visitCodePoints(String str, IntConsumer visitor)
    • unescapeString

      public String unescapeString(String str)
    • processCodePoint

      private void processCodePoint(int codePoint, StringBuilder res)
    • isEscapeNeededForCodePoint

      private boolean isEscapeNeededForCodePoint(int codePoint)
    • unescapeChar

      public String unescapeChar(char c, boolean explicitCast)
      Represent single char the best way possible
    • unescapeChar

      public String unescapeChar(char ch)
    • getSpecialStringForCodePoint

      @Nullable private @Nullable String getSpecialStringForCodePoint(int c)
    • escape

      public static String escape(String str)
    • escapeXML

      public static String escapeXML(String str)
    • escapeResValue

      public static String escapeResValue(String str)
    • escapeResStrValue

      public static String escapeResStrValue(String str)
    • escapeXmlChar

      @Nullable private static @Nullable String escapeXmlChar(char c)
    • escapeWhiteSpaceChar

      @Nullable private static @Nullable String escapeWhiteSpaceChar(char c)
    • commonEscapeAndAppend

      private static void commonEscapeAndAppend(StringBuilder sb, char c)
    • notEmpty

      public static boolean notEmpty(String str)
    • isEmpty

      public static boolean isEmpty(String str)
    • notBlank

      public static boolean notBlank(String str)
    • countMatches

      public static int countMatches(String str, String subStr)
    • containsChar

      public static boolean containsChar(String str, char ch)
    • removeChar

      public static String removeChar(String str, char ch)
    • countLinesByPos

      public static int countLinesByPos(String content, int pos, int start)
      returns how many lines does it have between start to pos in content.
    • getLine

      public static String getLine(String content, int pos, int end)
      returns lines that contain pos to end if end is not -1.
    • isWhite

      public static boolean isWhite(char chr)
    • isWordSeparator

      public static boolean isWordSeparator(char chr)
    • splitByFixedString

      public static List<String> splitByFixedString(String content, String splitStr)
    • removeSuffix

      public static String removeSuffix(String str, String suffix)
    • getPrefix

      @Nullable public static @Nullable String getPrefix(String str, String delim)
    • getDateText

      public static String getDateText()
    • formatNumber

      private String formatNumber(long number, int bytesLen, boolean cast)
    • getCastStr

      private static String getCastStr(int bytesLen)
    • formatByte

      public String formatByte(long l, boolean cast)
    • formatShort

      public String formatShort(long l, boolean cast)
    • formatInteger

      public String formatInteger(long l, boolean cast)
    • formatLong

      public String formatLong(long l, boolean cast)
    • formatDouble

      public static String formatDouble(double d)
    • formatFloat

      public static String formatFloat(float f)
    • capitalizeFirstChar

      public static String capitalizeFirstChar(String str)