Token Identifiers - 14/11/05 07:45 PM
This could either be a feature suggestion or a code snippet. (Mods, move if necessary)
I recently had a use for a combination of token identifiers to get my code working. So instead of writing the same combination over and over, I made several custom identifiers. These are the ones I made:
And here is the full code with comments:
If you have any suggestions/comments/improvements/etc, please post them. And like I said, if this post would be better in another section of the forum, mods can please move it.
-genius_at_work
I recently had a use for a combination of token identifiers to get my code working. So instead of writing the same combination over and over, I made several custom identifiers. These are the ones I made:
Code:
$findwildtok(tokens,wildstring,N,M,C) $repwildtok(tokens,wildstring,new,N,M,C) $remwildtok(tokens,wildstring,N,M,C)
And here is the full code with comments:
Code:
; $findwildtok(tokens,wildstring,N,M,C) ; tokens = string to search in ; wildstring = wild string to search for ; N = which wild token to return ; M = which matching token to find ; C = token character [color:green]findwildtok return $findtok($$1,$wildtok($$1,$$2,$$3,$$5),$$4,$$5)[/color] ; ; $repwildtok(tokens,wildstring,new,N,M,C) ; tokens = string to search in ; wildstring = wild string to search for ; N = which wild token to return ; new = replacement string to insert ; M = which matching token to replace ; C = token character [color:green]repwildtok return $reptok($$1,$wildtok($$1,$$2,$$3,$$6),$$4,$$5,$$6)[/color] ; ; $remwildtok(tokens,wildstring,N,M,C) ; tokens = string to search in ; wildstring = wild string to search for ; N = which wild token to return ; M = which matching token to replace ; C = token character [color:green]remwildtok return $remtok($$1,$wildtok($$1,$$2,$$3,$$5),$$4,$$5)[/color]
If you have any suggestions/comments/improvements/etc, please post them. And like I said, if this post would be better in another section of the forum, mods can please move it.
-genius_at_work