Closed FedericoCeratto closed 8 months ago
There is strutils.continuesWith().
FWIW I have SSE optimized stdlib parsers in beta state.
contains
is just convenience for find
and find
has start
and end
(?). :thinking:
Having searched for "match", "contains", "substring" I could not find "continuesWith". Perhaps it could have a more intuitive alias.
Previous discussion of SSE: https://github.com/nim-lang/Nim/issues/3155
This RFC is stale because it has been open for 1095 days with no activity. Contribute a fix or comment on the issue, or it will be closed in 30 days.
strutils should provide a
containsAt
ormatchAt
proc to check if a string contains a substring at a given location. It's commonly used for implementing network protocols or file formats. It should use memcmp to benefit from SSE instructions and avoid loops or nested conditionals.It could use toOpenArray or #178
Perhaps a similar proc should also exist for MemFiles