Package com.uc4.util

Class StringLengthUtil


  • public class StringLengthUtil
    extends java.lang.Object
    This utility returns the length of a string in UTF-8
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int getUtf8BytesLength​(java.lang.String s)
      Returns the amount of bytes of the passed String in bytes
      • Methods inherited from class java.lang.Object

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

      • getUtf8BytesLength

        public static int getUtf8BytesLength​(java.lang.String s)
        Returns the amount of bytes of the passed String in bytes
        Parameters:
        s - String to be checked
        Returns:
        amount of bytes of the passed String in bytes