[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Filching a few characters from a string



1. The wildcard chars. do work in XS command -- you do have to use uppercase
letters for the wildcards, however, as in X and not x
2. If you're willing to use the menus, you can get the leftmost "n"
characters of a string very easily. Put the string to be searched into S/G
40 and the number of characters to offset into S/G 45. Then in your routine
put JM (LeftString) where JM is a function call with no space after it. The
left "n" characters are returned in S/G 41 and the remainder in S/G 42. If
you do the same thing with JM (RightString), you get the right "n" characters
in S/G 42 and the remainder in S/G 41. Or you can swipe the code from the
DLG file and modify it for your own routines. I just tried to get the
leftmost 5 characters in the string "abc defg" and got "abc d" in S/G 41 and
"efg" in S/G 42. So it works with spaces. The character count is for
single-byte characters.

Write if you have problems or need more details.
TBaehr@xxxxxxxx