mdlTextConversion¶
mdlTextConversion is a public module providing numeric-to-English-words conversion (typically for printed check/dollar amounts) and a sentence-case string extension.
Purpose¶
- Convert a
Longnumeric value into its spelled-out English-words representation. - Provide a
ToSentenceCaseextension method for sentence-style string capitalization.
Context¶
- Namespace:
SAIF.Business.Utilities - Assembly/package:
SAIF.Business.Utilities(NuGet packageSAIF.BOF.Business.Utilities)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| NumberToText | Public Function NumberToText(n As Long) As String |
Recursively converts a Long numeric value into its English words representation (e.g., spelled-out check/dollar amounts). Supports values up to 999,999,999,999,999; throws ApplicationException above that limit. See BR-002. |
| ToSentenceCase | <Extension()> Public Function ToSentenceCase(Target As String) As String |
Upper-cases the first character of a string and lower-cases the remainder. |
Behavioral notes¶
NumberToTextenforces an explicit upper bound of 999,999,999,999,999; calling it with a larger value throwsApplicationException("Number too large to convert to text. Limit is 999,999,999,999,999."). See BR-002.NumberToTextdecomposes the input recursively by magnitude group (ones/teens, tens, hundreds, thousands, millions, billions, trillions), using the privateRoundDownhelper internally.ToSentenceCaseonly affects the first character's case; it does not perform per-word title-casing likeTitleCase.ToTitleCase.
Constraints and usage notes¶
NumberToTextis intended for positive integer amounts (e.g., dollar amounts on printed checks); behavior for negative values could not be confirmed from the scanned source.**
Note: Statements marked with
**could not be confirmed; treat as unknown until verified.
Sources¶
Business\SAIF.Business.Utilities\mdlTextConversion.vb