@@ -0,0 +1,1044 @@
+package com.glezo.stringUtils;%0A%0Apublic class StringUtils %0A%7B%0A%09/*%0A%09%09Just a bunch of common-use, one-liner static methods, implemented here to enhance readibility %0A%09*/%0A%09//-----------------------------------------------------------------------------------------------%0A%09public static boolean%09%09is_decimal_integer(String input)%0A%09%7B%0A%09%09if(input==null)%0A%09%09%7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%09for(int i=0;i%3Cinput.length();i++)%0A%09%09%7B%0A%09%09%09char current_char=input.charAt(i);%0A%09%09%09if('0'%3C=current_char && current_char%3C='9')%0A%09%09%09%7B%0A%09%09%09%09%0A%09%09%09%7D%0A%09%09%09else%0A%09%09%09%7B%0A%09%09%09%09return false;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return true;%0A%09%7D%0A%09//-----------------------------------------------------------------------------------------------%0A%09public static String%09%09max_prefix_conforming_an_integer_for(String input)%0A%09%7B%0A%09%09for(int i=input.length()-1;i%3E=0;i--)%0A%09%09%7B%0A%09%09%09String current_string=input.substring(0,i);%0A%09%09%09if(StringUtils.is_decimal_integer(current_string))%0A%09%09%09%7B%0A%09%09%09%09return current_string;%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return null;%0A%09%7D%0A%09//-----------------------------------------------------------------------------------------------%0A%7D%0A

Create StringUtils.java