Skip to content

Feature: sz_is_ascii — SIMD-accelerated pure-ASCII check #310

@belugabehr

Description

@belugabehr

Describe what you are looking for

Databases frequently need to check if a string is pure ASCII (all bytes < 0x80) to select
between fast ASCII-only code paths and slower Unicode-aware paths. This check gates
case-insensitive search, case conversion, collation, and validation.

Proposed API

/**
 * @brief Check if all bytes in a string are in the ASCII range [0x00, 0x7F].
 * @return sz_true_k if all bytes are ASCII, sz_false_k otherwise.
 */
SZ_DYNAMIC sz_bool_t sz_is_ascii(sz_cptr_t text, sz_size_t length);

Can you contribute to the implementation?

  • I can contribute

Is your feature request specific to a certain interface?

It applies to everything

Contact Details

No response

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions