Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

StringBuffer confusion ?  RSS feed

 
sharon daze
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all ,

how i can increase a value of StringBuffer.
For example if i have "A" inside StringBuffer element then how i can increment it to next letter.

Thanks & Regards
Sharon
 
Devaka Cooray
Marshal
Posts: 5322
575
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sharon daze wrote:how i can increase a value of StringBuffer


What do you mean by increasing the value of StringBuffer? Did you mean converting from A to B, C to D, and so on? In that case, how if you increase the 'char' value of each letter in the string.




Cheers,

Devaka.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12440
42
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your stringBuffer contained "Hello. My name is Inigo Montoya.", what would you increment this to?

Further, I don't think this is a well defined problem, especially since different character sets may not have letters in the same order, or consecutive letters stored as consecutive integers. And what would you increment a 'z' to?

Can you define the problem better? Tell us exactly what you want - or if this is a homework assignment, give us the EXACT and COMPLETE text of it, and we can perhaps steer you better.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!