Skip to content

Commit

Permalink
Introduce Token Map: An optimized static translation class.
Browse files Browse the repository at this point in the history
This patch introduces a new class: `WP_Token_Map`, which is designed for
efficient lookup and translation of static mappings between string keys
or tokens, and string replacements (for example, HTML character
references).

The token map incorporates certain limitations on the string length of
the tokens, but takes advantage of multiple optimizations to efficiently
find and replace tokens in a string.
  • Loading branch information
dmsnell committed May 8, 2024
1 parent 3a6cca9 commit 502e4f5
Show file tree
Hide file tree
Showing 3 changed files with 1,926 additions and 0 deletions.
Loading

0 comments on commit 502e4f5

Please sign in to comment.