Quickly identifying a sequence of digits in a string of characters

Metadata

Source URL:: https://lemire.me/blog/2018/09/30/quickly-identifying-a-sequence-of-digits-in-a-string-of-characters/
Topics:: #github, #vectordb, #sequence


Suppose that you want to quickly determine a sequence of eight characters are made of digits (e.g., ‘9434324134’). How fast can you go? In software, characters are mapped to integer values called the code points. The ASCII and UTF-8 code points for the digits 0, 1,…, 9 are the consecutive integers 0x30, 0x31, …, 0x39 … Continue reading Quickly identifying a sequence of digits in a string of characters

Highlights