G
Guest
Hi All:
I need an easy way to format a string.
Here is my situation:
when the user inputs a character 'A', my logic suppose adding two ##. The
expecting result is ##A.
when the user inputs two characters 'AA', my logic only needs to add one #.
The expecting result is #AA.
when the user inputs three characters 'AAA', my logic does not need to add
any #.
I am expecting the issue can be resolve easily in string.Format() function
with proper formatter. But the most of formatter I can find is relate to
numeric or datetime. I'd like to know is there formatter I can use to help me
resolve my issue.
Thanks in advance
I need an easy way to format a string.
Here is my situation:
when the user inputs a character 'A', my logic suppose adding two ##. The
expecting result is ##A.
when the user inputs two characters 'AA', my logic only needs to add one #.
The expecting result is #AA.
when the user inputs three characters 'AAA', my logic does not need to add
any #.
I am expecting the issue can be resolve easily in string.Format() function
with proper formatter. But the most of formatter I can find is relate to
numeric or datetime. I'd like to know is there formatter I can use to help me
resolve my issue.
Thanks in advance