Forums Register Login

Regular expression

+Pie Number of slices to send: Send
Split method

I want to know how the following 2 cases worked in the example mentioned in the above link


[ December 14, 2004: Message edited by: Pradeep Bhat ]
+Pie Number of slices to send: Send


If the limit is negative, the actual value doesn't matter. The negative value just means to split into as many tokens as possible, and preserve any trailing empty tokens.



In this one, the first empty string is between the first two "o"s, the second empty string is between the other two "o"s, and that last empty string is there because the target ends with a delimiter, and the empty string is "after" that.
+Pie Number of slices to send: Send
Thanks Ernest for the great explanation.
We must storm this mad man's lab and destroy his villanous bomb! Are you with me tiny ad?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 709 times.
Similar Threads
Question on Integer.toBinaryString (maybe)
++ Operator not working with If else statement
Regular expression for valid xml
Flow Control !
Identify even numbers or rows in a loop
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:12:19.