I've been wondering if there's any way to improve on this:
It works, but it's damn ugly. I would expect to be able to do something like this:
But this doesn't work. Interestingly, this doesn't do what I expect either:
I actually get the entire contents of arg.
Code:
.if (.strat(.string(arg), 0) = 'e' && \
.strat(.string(arg), 1) = 'n' && \
.strat(.string(arg), 2) = 't' && \
.strat(.string(arg), 3) = 'i' && \
.strat(.string(arg), 4) = 't' && \
.strat(.string(arg), 5) = 'y' && \
.strat(.string(arg), 6) = '_')
.strat(.string(arg), 1) = 'n' && \
.strat(.string(arg), 2) = 't' && \
.strat(.string(arg), 3) = 'i' && \
.strat(.string(arg), 4) = 't' && \
.strat(.string(arg), 5) = 'y' && \
.strat(.string(arg), 6) = '_')
It works, but it's damn ugly. I would expect to be able to do something like this:
Code:
.if (.match (.left (7, {arg}), entity_))
But this doesn't work. Interestingly, this doesn't do what I expect either:
Code:
.out .string(.left(7, {arg}))
I actually get the entire contents of arg.