You need to sign in to do that
Don't have an account?
jeregar
Code:
to anyone who can help me...thanks
How to convert strings to integer in a trigger?
Has anyone needed to convert a string variable to integer? I need to code a verification digit function, and I am getting the digits from a string with the substring function. Next to that, I need to convert each 'text' number to integer for multiplication.
Here is a sample of what I need...
public static boolean CUITVerification(String cuit) { if(cuit.length() != 11) return false; String xx1 = cuit.substring(1,1); Integer x1 = xx1; x1 = x1 * 5; if(x1 == 10) return true; }
to anyone who can help me...thanks
Of course there's no handling in there for if the string doesn't convert well...
Steve
All Answers
Of course there's no handling in there for if the string doesn't convert well...
Steve