Created
December 23, 2015 16:03
-
-
Save SriniBlog/7bbe205e21572deb62c0 to your computer and use it in GitHub Desktop.
removeLeadingZero - This UDF will remove the leading Zero from the number field.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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