Home / Companies / Cloudflare / Blog / Post Details
Content Deep Dive

The oldest trick in the ASCII book

Blog post from Cloudflare

Post Details
Company
Date Published
Author
John Graham-Cumming
Word Count
329
Company Posts That Month
12
Language
English
Hacker News Points
9
Post removed?
No
Summary

The ASCII table has a peculiarity where uppercase letters have an ASCII code 0x20 less than their lowercase counterparts. This fact can be used in certain situations to convert ASCII text to uppercase using bitwise AND operation, which is particularly useful when dealing with protocols that use USASCII characters for their commands such as SMTP, POP3, DNS names and HTTP headers. In C programming language, this trick can be employed to make very fast case-insensitive comparisons in situations where high performance is required, like handling millions of DNS packets per second.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.