How to remove the "0" from the starting i.e. from the left of the CString
-
Hi, I am having the follwoing CString "0000122334" and I need to remove the starting zeros from the string. Kindly help. Thanks in Advance.
-
Hi, I am having the follwoing CString "0000122334" and I need to remove the starting zeros from the string. Kindly help. Thanks in Advance.
TrimLeft("0"); call this CString member function.
-
Hi, I am having the follwoing CString "0000122334" and I need to remove the starting zeros from the string. Kindly help. Thanks in Advance.
Just a sidenote to what Prasann Mayekar said: if your string contains only zeroes, "0000", trimming it will result in an empty string, also, if you can have fractions, like "0.45", then trimming will result in ".45".
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > //TODO: Implement signature here<
-
Hi, I am having the follwoing CString "0000122334" and I need to remove the starting zeros from the string. Kindly help. Thanks in Advance.
There can be various ways of doing this: 1. Use the Replace method from the CString class 2. Iterate through the characters in the string, until you get a non zero element. Store the index here and use the TrimXYZ function from the CString class.
You talk about Being HUMAN. I have it in my name AnsHUMAN