• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to sort a String

 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can i sort a String?
Say I have a String "dcab". I want to sort it to "abcd".

Please give me pointers in this regard.
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A string is internally a char[]...
 
Anjali S Sharma
Ranch Hand
Posts: 279
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by A Kumar:
A string is internally a char[]...


Thanks a lot. Its working now.
 
Ariel Ortiz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


...Ariel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic