2017년 7월 18일 화요일

How to increment a string?


I have a TextBox that I want the user to be able to input a string consisting of 1-3 letters followed by 1-2 numbers.  For example "A1" or "AAA11".

How do I increment this string by 1 so that I can use the new value?

--
Perhaps



-- 
AA11 + 1 = AA12 or AA111 ??
AA99 + 1 = ?

-- 
first you have to separate the numbers 
then add 1

the for loop is searching for the last letter. -> NumberStart+1 is the first number

then the whole number will be separated

and add 1

 (you can replace the TextBox by a Variable)

-- 

댓글 없음:

댓글 쓰기