count up alphanumerically

  • Thread starter Thread starter Markus Schnitzer
  • Start date Start date
M

Markus Schnitzer

Hello,
I must count up a alphanumerically-number:

A = "ABC12"
A += 1
then
A => ABC13

or "A34C" => "A34D"

What can I do?

Thanks

Markus@Schnitzer-cp,
 
Hello,
I must count up a alphanumerically-number:

A = "ABC12"
A += 1
then
A => ABC13

or "A34C" => "A34D"

What can I do?

Once you realize that every character, numeric or alphabetic, has a
numerical representation, the solution to your problem is simple.
 
what will ZZZ + 1 give you ...

or A9 + 1 give you

how do you wrap and expand these alpha-numerical "numbers".

ie.

9 + 1 = 10

99 + 1 = 100

Z + 1 = ??

once you define the rules, you should be able to easily write a class to do
this. Use the String and check the right most character...

Jeff.
 
Back
Top