Created
December 25, 2009 19:49
-
-
Save lsparrish/263734 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ( This is an implementation of crc's ifExists which demonstrates the ) | |
| ( parsing of curly braces for the conditional evaluation of text. ) | |
| {{ | |
| : cut ( a-a ) | |
| dup getLength over + 1- dup @ 32 =if | |
| 0 swap ! else drop then ; | |
| : "cut ( c"-a ) accept tib tempString cut ; | |
| : '{ ( "-a ) char: { "cut ; | |
| : '} ( "-a ) char: } "cut ; | |
| ---reveal--- | |
| : ifExists ( "- ) | |
| '{ find | |
| '} swap if dup getLength eval ;then drop ; | |
| }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment