• Post Reply Bookmark Topic Watch Topic
  • New Topic

searching ASCII value in String Buffer  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In My below code i am searching the location of s value is "þ" which is called as a value marker in Oracle. The equivalent ASCII value of þ=254. How to search with respect to 254 instead of þ




Any help will be much appreciated.
 
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you using StringBuffer rather than StringBuilder?
You know there are methods to get a particular char from a stringBuilder, and a char is not a letter but a number, so you can do arithmetic with it and see whether it is equal to 123, etc?
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By the way, þ is called “thorn”. It is the lower‑case version.
 
Sheriff
Posts: 22846
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I posted something incorrect because I got confused between upper-case and lower-case thorn. Please disregard.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!