After from JDK1.4, String class, added the string split method to achieve the division, but the method has failed J2ME (MIDP2.0 also not to do), but the actual use of the process, sometimes we really have to used in this operation, there will be a section of code I used to achieve and share:

/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware

backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp partition string theory: testing string split string, and then take the substring

backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp @ param original the string necessary to split

backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp @ paran regex string split

backup bin conf config data eshow_sitemap.html generate.sh log maint sitemap.html svn tmp @ return array of strings generated after segmentation

backup / bin / conf / data / log / maint / svn / tmp /
private static String [] split (String original, String regex)

(

/ / Get the starting position of substring

int startIndex = 0;

/ / Will result in the data first into the Vector

Vector v = new Vector ();

/ / Return the result array of strings

String [] str = null;

/ / Store the starting position when taking the substring

int index = 0;
/ / Get position of substring matching

startIndex = original.indexOf (regex);

/ / System.out.println (”0″ + startIndex);

/ / If the starting position of string is less than the length of the string, then the show did not get to the end of the string.

/ / -1 On behalf of access to the end of the

while (startIndex

(

String temp = original.substring (index, startIndex);

System.out.println (”" + startIndex);

/ / Get substring

v.addElement (temp);
/ / Set to take the starting position of substring

index = startIndex + regex.length ();
/ / Get position of substring matching

startIndex = original.indexOf (regex, startIndex + regex.length ());

)
/ / Get the end of the substring

v.addElement (original.substring (index + 1 - regex.length ()));

/ / Will convert an array of Vector objects

str = new String [v.size ()];

for (int i = 0; i

(

str [i] = (String) v.elementAt (i);

)

/ / Return the resulting array

return str;

)

Recommended links:

4G stressed highly versatile

Training Of New Employees Approach HR

EVALUATE Trace And Ping Tools

Bonus of SIGHT [2]

Recommend News Servers

Allocated Memory In An Object Structure

RMVB To MP4

The World To Those Who Have Access

Picked Components And Libraries

Ubuntu will build a Full team in China

Assembly language of high-level language Features

Sonic Foundry Vegas 4.0 Collection 25 novice fly into effect

MKV to MP4

Top Compilers And Interpreters

power Trading

3G2 To MOV

Visual Studio08 Now Open To MSDN Users