Class PaddingUtils

    • Constructor Detail

      • PaddingUtils

        public PaddingUtils()
    • Method Detail

      • padding

        public static String padding​(String rawString,
                                     int maxPaddingLength)
        Applies padding to given string up to specified number of characters. If given string is shorter or same as maxPaddingLength, it will just return the original string. Otherwise it would be padded with "\0" character to have at least "maxPaddingLength" characters
        Parameters:
        rawString - raw string
        maxPaddingLength - max padding length
        Returns:
        padded output