I'm looking for a way for a snippet to perform a transformation on a tab stop, but to output the number characters, not to modify the captured tab stop. Can anyone think of how this would be done? Example: A tab trigger for the PHP function strncmp(), and when I type 'string', the third argument would update to the total number of characters in the string.
strncmp($$1, '$2', <character count of $2>)
giving me:
strncmp($foo, 'string', 6)
-Derek
On Aug 22, 2007, at 11:24 AM, Derek Jones wrote:
I'm looking for a way for a snippet to perform a transformation on a tab stop, but to output the number characters, not to modify the captured tab stop. Can anyone think of how this would be done?
This would only be possible by manually matching strings of length 1 OR length 2 OR length 3 … and then do conditional replacements.