P5-string-toidentifier-en

Jul 20, 2023

Convert Strings to English Program Identifiers

StringToIdentifierEN provides a utility method, “to_identifier” for converting an arbitrary string into a readable representation using the ASCII subset of \w for use as an identifier in a computer program. The intent is to make unique identifier names from which the content of the original string can be easily inferred by a human just by reading the identifier.

If you need the full set of \w including Unicode, see the subclass StringToIdentifierENUnicode.

Currently, this process is one way only, and will likely remain this way.

The default is to create camelCase identifiers, or you may pass in a separator char of your choice such as _.

Binary char groups will be separated by _ even in camelCase identifiers to make them easier to read, e.g. foo_2_0xFF_Bar.



Checkout these related ports:
  • Zxing-cpp - ZXing C++ Library for QR code recognition
  • Zu-hunspell - Zulu hunspell dictionaries
  • Zu-aspell - Aspell Zulu dictionary
  • Zq - Easier and faster alternative to jq
  • Zorba - General purpose C++ XQuery processor
  • Zenxml - Simple C++ XML Processing
  • Zed - Command-line tool to manage and query Zed data lakes
  • Yq - Command-line YAML and XML processor, jq wrapper for YAML/XML documents
  • Yould - Pronounceable word generator
  • Yodl - Easy to use but powerful document formatting/preparation language
  • Yi-hunspell - Yiddish hunspell dictionaries
  • Yi-aspell - Aspell Yiddish dictionary
  • Yelp-xsl - DocBook XSLT stylesheets for yelp
  • Yelp-tools - Utilities to help manage documentation for Yelp and the web
  • Ydiff - Diff readability enhancer for color terminals