• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Extract character from string

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

How Do I extract these characters ?



I want to extract every char except at 'x' position . Can I use a kind of bit masking ?How can I avoid to use 'charAt() ' ?

 
Rancher
Posts: 3968
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

How Do I extract these characters ?


What happens when you execute that code and print out the values of the variables: ch1 to ch6?

How can I avoid to use 'charAt() ' ?


Extract the String into an array where the individual characters can be accessed.
 
It is an experimental device that will make my mind that most powerful force on earth! More powerful than this tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic