Signature (Visual Basic / VBA)
Public Function AddSpaceBeforeCapitals( _
ByVal vValue As Variant _
) As Variant
Code Example
AddSpaceBeforeCapitals("CBACorp") = "CBA Corp"
AddSpaceBeforeCapitals("AddSpaceBeforeCapitals") = "Add Space Before Capitals"
Parameters
| Parameter | Description |
|---|---|
| vValue | The string which is to have space characters added before trailing capital letters. Function returns Null if vValue is Null or cannot be fixed up to a String. |
Notes & Version History
| Note | Function uses the built-in character classification routines to determine which characters are upper-case. |
| Note | If there is a single capital letter at the beginning of the line (followed by nothing else or followed by a non-capital letter), the function does not add a space before that capital letter. |