Ashley Sanders wrote:
> The other difference is that an "ends-with" modifier doesn't need
> to be coded with the length of the string you are looking for, eg:
>
> foo.fileName =/ends-with .html
>
> as opposed to
>
> foo.fileName =/substring=-5 .html
>
> So, whatever is constructing this query doesn't need to measure
> the length of the thing they are looking for. And if it is a human
> constructing this query, then it is one less error prone operation
> to perform.
>
> Plus, "ends-with" expresses the intent of the query in a much more
> natural way and one that is far more obvious to anyone trying to
> understand what on earth the query is trying to achieve. Likewise
> a "starts-with" modifier.
That looks very convenient.
/starts-with (equal to ="...*")
/ends-with (equal to ="*...")
/contains (equal to ="*...*")
are probably more common use-cases than /substring and they are easier
to remember and to implement than juggling asterisks.
Greetings,
Jakob
|