|
ORE Studio 0.0.4
|
String manipulation utilities. More...
Classes | |
| class | conversion_error |
| An error occurred whilst converting a string. More... | |
| class | converter |
| Type conversion utilities. More... | |
Functions | |
| std::string | strip_corporate_suffixes (const std::string &name) |
| Strips corporate/legal suffixes from an entity name. | |
| std::string | generate_short_code (const std::string &name) |
| Generates a 3-6 character mnemonic short code from an entity name. | |
| std::string | generate_unique_short_code (const std::string &name, std::unordered_set< std::string > &used_codes) |
| Generates a unique short code, appending numeric suffixes on collision. | |
String manipulation utilities.
Contains utility functions for strings.
Contains string processing functions including trimming, splitting, joining, and case conversion.
| std::string strip_corporate_suffixes | ( | const std::string & | name | ) |
Strips corporate/legal suffixes from an entity name.
Mirrors the SQL function ores_utility_strip_corporate_suffix_fn. Removes dotted abbreviations (S.A., B.V., etc.) and word suffixes (PLC, LLC, LTD, INC, CORP, etc.).

| std::string generate_short_code | ( | const std::string & | name | ) |
Generates a 3-6 character mnemonic short code from an entity name.
Reimplements the SQL function ores_utility_generate_short_code_fn:

| std::string generate_unique_short_code | ( | const std::string & | name, |
| std::unordered_set< std::string > & | used_codes | ||
| ) |
Generates a unique short code, appending numeric suffixes on collision.
Mirrors the deduplication pattern in dq_lei_counterparties_publish_create.sql. If the base code already exists in used_codes, appends 2, 3, ... until unique. Inserts the final code into used_codes.
