Created
May 24, 2011 21:38
-
-
Save fractastical/989784 to your computer and use it in GitHub Desktop.
@Hemm 15 char String sto IDs
This file contains hidden or 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
| string s = '0013000000K7WW2'; | |
| 2.try{ | |
| 3. ID sID = s; | |
| 4. // if we get here, it's a valid ID and the sID field is an 18 character one | |
| 5.} catch (System.StringException e){ | |
| 6. // if it goes here, it's not an ID. Do something if you need to. | |
| 7.} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment