projects
/
IRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f88d6b6
)
split method added
author
jihoonl
<jihoonl>
Sun, 1 Nov 2009 06:33:39 +0000
(06:33 +0000)
committer
jihoonl
<jihoonl>
Sun, 1 Nov 2009 06:33:39 +0000
(06:33 +0000)
Robust/src/ClassLibrary/String.java
patch
|
blob
|
history
diff --git
a/Robust/src/ClassLibrary/String.java
b/Robust/src/ClassLibrary/String.java
index 5acb4954ba3bb04446c0e0712c6e89b7dcc4cd91..c28c8d4e9602b207b2a6e96962ed224c6f6f1785 100644
(file)
--- a/
Robust/src/ClassLibrary/String.java
+++ b/
Robust/src/ClassLibrary/String.java
@@
-381,4
+381,25
@@
public class String {
}
return true;
}
+
+ public Vector split() {
+ Vector splitted = new Vector();
+ char[] token = "\n\t ";
+ int i;
+ int cnt =0;
+
+ String tmpStr = new String();
+
+ for(i = 0; i< count; i++) {
+ if(value[i] == '\n' || value[i] == '\t' || value[i] == ' ') {
+ splitted.add(tmpStr);
+ tmpStr = new String();
+ }else {
+ tmpStr += value[i];
+ }
+ }
+
+ return splitted;
+
+ }
}