This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
i have these code but not work in myproc2 any advices why?
NOTE: i am Delphi programmer and i need know the next other string functions: wcade="Mycade|XXX" 1) Pos("|",wcade) return me: 7 if not exist return me a 0 2) Delete(wcade,1,2) return me: cade|XXX in java? [ edited to format code and to preserve formatting using the [code] and [/code] UBB tags -ds ] [ March 15, 2004: Message edited by: Dirk Schreckmann ]
Welcome to JavaRanch, Miguel! I've very happy that a fellow rancher has already helped to point you in the right direction for solving your problem. I'm posting just to suggest a simple tip to help improve communications in these forums. When posting code, please be sure to surround the code with the [code] and [/code] UBB Tags. This will help to preserve the formatting of the code, thus making it easier to read and understand.
The parameter to split() is a regular expression. '|' is a regex logical operator. Change "|" to another expression, (like maybe ":") and you will get an array of strings as follows: Chihuahua 30 Jose Alfredo Miguel 1