Skip to content

Instantly share code, notes, and snippets.

@SriniBlog
Created December 23, 2015 16:03
Show Gist options
  • Save SriniBlog/7bbe205e21572deb62c0 to your computer and use it in GitHub Desktop.
Save SriniBlog/7bbe205e21572deb62c0 to your computer and use it in GitHub Desktop.
removeLeadingZero - This UDF will remove the leading Zero from the number field.
public String removeLeadingZero(String FieldValue, Container container) throws StreamTransformationException{
String newFieldValue = "";
try{
//Find 0 from starting and replace it with nothing
newFieldValue = FieldValue.replaceFirst("^0+", "");
}catch(Exception ee){
newFieldValue = FieldValue;
}
return newFieldValue;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment