|
Answer» If this topic has been previous posted I appologize but I did not find anything SIMILAR to this when I was searching the DATABASE regarding strings.
Question: Can you break a string up into subtrings. I know you can do this in UNIX but can you do this using a batch file?
You have a string, "abc", and you break up the string into characters and assign those characters to different variables.
For example: str = abc chr1 = a chr2 = b chr3 = c
Like before, any comment or SUGGESTIONS are always welcome.
thank you.I figure it out. Ok, that's not entirely true. I found an example on the net regarding substring:
%VAR:~n,m%
where n is the starting position (from zero) and m the substring's LENGTH. So, if VAR is set to "My pretty girl", %VAR:~3,6% identifies the substring "pretty".
n may have negative values meaning it REFERS to the end of the variable.
|