public static String trim(@NonNull String str,int start,int end){
  return str.length() > start ? (str.length() > end ? str.substring(start,end) : str.substring(start)) : "";
}

public static String trim ( @ NonNull String str , int start , int end ) { return str . length ( ) > start ? ( str . length ( ) > end ? str . substring ( start , end ) : str . substring ( start ) ) : "" ; }
trims a string from a start position to an end position .
