• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

How to group string values according to their first character

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've been trying to solve this thing for days.
My data comes in to my android app in this form



What I wanted to do is to group these data according to their first characters (^)( /) ( and the last has no symbol since I'd declared it as else)
Then, I wanted to display them in a table where: ^ goes to column 1, / goes to column 2 and the last would be in column 3

My problem is that I'm clueless as to how I'd be able to separate them using android code.
 
Marshal
Posts: 65366
248
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How would you do that without a computer? Write down instructions for how to do it, but do it so simply that anybody can understand it. Remember you will have to create a special case for things beginning with numbers; you cannot simply call it, “no starting character”.
I don't know whether the code would be different in ordinary Java® from Android, so you mustn't use any computing words in the description.
 
Klarisk Cersul
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry,  I forgot to mention I'm using a microcontroller. And the values are already processed/computed there.
My purpose for the android would be to help monitor those values in real time.

So now what I wanted to know is how I'd be able to separate them since those values are somewhat mixed
when they come in for display.
 
Story like this gets better after being told a few times. Or maybe it's just a tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!