The STRING_POOL is a collection of strings. It is initialized from
another collection. The strings are not kept "as-is"; that way, you
can reuse your initial collection, or the strings in it; the
string_pool won't be changed.
Be aware that using a STRING_POOL is not always interesting, because
it is very memory-consuming. It's advantage, though, is to be able to
find if a string is in the pool or not (and find its index), very
quickly.
The given strings will be the ones
that can be matched. In that case, match will return the index
of the matched string in that collection.
Be aware that the processing time is quite heavy during the
initialization. It's the pay-off to make it really lighter
matches. Don't use the string_pool for a one-time test, it's only
useful in the long run.
After initialization, you can safely discard or modify the
collection; it will not change the automaton.
require
headers_not_void: a_headers /= Void
headers_not_empty: a_headers.count > 0
each string contains a different word
headers_not_empty: -- each string is non-empty
Append in str the Eiffel coding of the character (Table in chapter 25 of ETL, page 423).%%%%%%%%
When the % letter notation exists, it is returned in priority: '%N' gives "%N", '%T'
gives "%T", etc.
When % letter notation does not exists (not in the ETL table), numbered coding
used ("%/1/", "%/2/" etc).