where local_macro_name is a valid name of either an existing local macro that will be modified or a valid name of a local macro that will be generated by lstrfun. The strings being modified can be as long as the maximum number of characters in a local macro minus about 50 (which is about how many characters are used to submit lstrfun).

Only one local macro name can be submitted and only one option can be specified.

Options

In these descriptions string is referring to the contents of the local macro.

indexnot("characters",macname) returns the position of the first character in the set of characters specified that is not found in the string, or it returns 0 (zero) if all characters in the set of characters specified are found in the string.

Local macro strings that are submitted in any of the options have to be enclosed in at least double quotes. It is a good idea to enclose local macro strings in compound double quotes in case the macro contains quotes.

The maximum number of characters submitted to an option of lstrfun in total cannot exceed the maximum length of strings in Stata minus about 50 (which is about how many characters are used to submit lstrfun). The command file read can create local macros with more characters than Stata allows. If you get the following error messages when submitting lstrfun, then the submitted macro has too many characters: