-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|429|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
SoCoder -> Snippet Home -> Text and GUI's


 
dna
Created : 28 June 2013
Edited : 06 July 2013

Capitalization

Capitalizes the first letter or a word or string of words.

The algorithm does exactly that.

I first wrote an algorithm that worked but which used Dim a(50) for counting the location of the spaces.
This worked but it limited the use of the routine.



The above routine works without the array and is one fifth the size.
Just pass your string and it comes back with the first letter of each word capitalized.
I have not checked the limits of the routine. there may be one but it may not be necessary unless someone wants to
use it on a large amount of information at once.

Like an Encyclopedia or something similar.

Enjoy

 

Comments