SAIF.Business.Utilities overview¶
Documentation context: Embedded component — documented from source within this repository.
SAIF.Business.Utilities is a small, stateless text-formatting utility library within the SAIF BOF Claims/Legal solution. It converts raw stored text (typically all-caps names, addresses, or statuses from Oracle-backed business data) into human-readable mixed case, and converts numeric amounts into English word form.
Purpose¶
- Convert all-caps or inconsistently cased stored strings into human-readable "title case" via
TitleCase.ToTitleCaseand the.ToTitleCase()string extension, using curated word lists to handle abbreviations, connector words, name prefixes/suffixes, and ordinal suffixes. - Spell out numeric (
Long) values as English words viamdlTextConversion.NumberToText, for amount-in-words style rendering, up to a 999,999,999,999,999 ceiling. - Consumed by higher business-layer libraries —
SAIF.Business.Policy.AgencyandSAIF.Business.View.Policy— to format display-name and status values sourced from Oracle-backed business data.
Responsibilities¶
- Provide a delimiter-preserving, word-list-driven title-casing algorithm (
TitleCase) that classifies each token as upper-case, lower-case, mixed-case-exception, ordinal, or name-prefixed, and reassembles the string with original punctuation/whitespace intact. - Expose the title-casing algorithm and related string helpers (
.ToProperCase(),.ToPadCapitalLetters(),.ToLower()/.ToUpper()for string arrays,.ContainsOnlyNumericCharacters()) as.ToXxx()extension methods viaTitleCaseExtensions. - Provide numeric-to-English-words conversion (
mdlTextConversion.NumberToText) and a simple sentence-case transform (.ToSentenceCase()). - Hold no mutable instance state and perform no data access, business-object lifecycle participation, or UI involvement — every public entry point is a
Shared/Module-level pure function.
Key components¶
TitleCase: owns the title-casing algorithm — tokenization, per-token case classification against curated word lists, delimiter-preserving reassembly, and possessive-suffix handling.TitleCaseExtensions: thin extension-method adapter exposingTitleCase.ToTitleCaseand related string helpers as.ToXxx()methods callable directly onString/String()instances.mdlTextConversion: owns numeric-to-English-words conversion (NumberToText) and theToSentenceCaseextension.
Related documentation¶
- Index
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Configuration settings
- API reference
Sources¶
- SAIF.Business.Utilities\SAIF.Business.Utilities.vbproj
- SAIF.Business.Utilities\TitleCase.vb
- SAIF.Business.Utilities\mdlTextConversion.vb
- .saifdocgen/state/runs/20260821-113120-claims-bof-web-legal/analysis/TSK007-analysis.md