<-- Previous || Up || Next -->

Add Space Before Capitals Function
String Words Class

Public Function AddSpaceBeforeCapitals( _
    ByVal vValue As Variant _
    ) As Variant

Adds spaces before the last capital letter in all sequences of one or more capital letters.
Function does not add a space before the first character of the word if it is otherwise a candidate capital letter.

    AddSpaceBeforeCapitals("CBACorp") = "CBA Corp"
    AddSpaceBeforeCapitals("AddSpaceBeforeCapitals") = "Add Space Before Capitals"
See also:
    AddSpaceBeforeAllCapitals Function
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.

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.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.