Mercurial > repos > tabletprog
diff modules/string.tp @ 270:b74956a2196f
Add a propertiesOf method to the object module that returns the names of things that look like getter messages
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 18 Jul 2014 20:45:50 -0700 |
parents | d2b70cba661e |
children | bb4723fec05e |
line wrap: on
line diff
--- a/modules/string.tp Fri Jul 18 19:31:07 2014 -0700 +++ b/modules/string.tp Fri Jul 18 20:45:50 2014 -0700 @@ -304,6 +304,12 @@ from: start withLength: (end - start) } + endsWith? <- :suffix { + if: (suffix length) <= length { + 0 = (compareSub: suffix (length - (suffix length)) 0 (suffix length)) + } + } + isInteger? <- { false } isString? <- { true } isBasicString? <- { true }