ColdFusion has a contains
operator, as in:
if ( value contains "foo" ) { ... }
To be fair, I almost never use this; but, I do like the sematics of it. Seems strange that we don’t have a startswith
and endswith
operator as well. As in:
if ( value endsWith "@bennadel.com" ) { ... }
if ( value startsWith "http://" ) { ... }
I know that the underlying java.lang.String
implementation has these corresponding methods. So, it seems like it would be rather trivial to expose them as operators ?
3 posts - 2 participants