stringtokenizer - Hidden char StringTokeneizer/split in Java? -
stringtokenizer - Hidden char StringTokeneizer/split in Java? -
i have text file , each of line that
author-title-kind i have java programme parsing file , must returns books author "example". read line @ time, , split string stringtokeneizer or split(). 3 items: author, title, kind. check if first item string equal "example". problem false, , never true. there hidden character comparing ends false? maybe should check "example-", or "-example"...or else?
remember string.split() takes regular look separator , not string. utilize apache commons stringutils.split() if want basic string splitting simple string.
java stringtokenizer
Comments
Post a Comment