private static String[] splitValueAndUnit(String encodedValueAndUnit){
  String[] result=new String[2];
  int len=encodedValueAndUnit.length();
  int firstLetterIndex=len;
  while (firstLetterIndex > 0 && Character.isLetter(encodedValueAndUnit.charAt(firstLetterIndex - 1))) {
    firstLetterIndex--;
  }
  result[0]=encodedValueAndUnit.substring(0,firstLetterIndex);
  result[1]=encodedValueAndUnit.substring(firstLetterIndex);
  return result;
}

private static String [ ] splitValueAndUnit ( String encodedValueAndUnit ) { String [ ] result = new String [ 2 ] ; int len = encodedValueAndUnit . length ( ) ; int firstLetterIndex = len ; while ( firstLetterIndex > 0 && Character . isLetter ( encodedValueAndUnit . charAt ( firstLetterIndex - 1 ) ) ) { firstLetterIndex -- ; } result [ 0 ] = encodedValueAndUnit . substring ( 0 , firstLetterIndex ) ; result [ 1 ] = encodedValueAndUnit . substring ( firstLetterIndex ) ; return result ; }
splits a string that encodes size with unit into the size and unit substrings . returns an array of two strings .
