Toon posts:

[Java] Hoe split ik op een "|" teken

Pagina: 1
Acties:
  • 43 views sinds 30-01-2008

Verwijderd

Topicstarter
Wanneer ik met java split toepas op een String die | bevat, dan split hij alle letters apart.

Voorbeeld:
String x="hallo|help|ikke";
String[] y=x.split("|");

result:
y[0]=h;
y[1]=a;
y[2]=l;
y[3]=l;
y[4]=o;
y[5]=|;
y[6]=h;
y[7]=e;
etc...

Wie o wie heeft de oplossing voor mij??

[ Voor 6% gewijzigd door Verwijderd op 26-05-2003 10:23 ]


  • Janoz
  • Registratie: Oktober 2000
  • Laatst online: 10:39

Janoz

Moderator Devschuur®

!litemod

javadoc wel.. redelijk RTM dit.. AL bij StringTokenizer gekeken?

Ken Thompson's famous line from V6 UNIX is equaly applicable to this post:
'You are not expected to understand this'


Dit topic is gesloten.