﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
2173	_StringProper doesn't capitalize correctly	BrewManNH		"The original _StringProper function doesn't correctly capitalize letters after some characters and numbers. If I use the original _StringProper on this string:
{{{
$String = ""She's all that I,wAnt (10th place of 2)""
}}}
I get this as the output from it:
{{{
_StringProper($String) = She'S All That I,Want (10Th Place Of 2)
}}}
As you can see, the 2nd S in She's, the W in want and the T in 10th are all capitalized and they shouldn't be.

A simple addition to the RegEx in the function will correct this. By changing this

[[[
Select
	Case $CapNext = 1
		If StringRegExp($s_CurChar, '[a-zA-ZÀ-ÿ]') Then
			$s_CurChar = StringUpper($s_CurChar)
			$CapNext = 0
		EndIf
	Case Not StringRegExp($s_CurChar, '[a-zA-ZÀ-ÿ]')
		$CapNext = 1
	Case Else
		$s_CurChar = StringLower($s_CurChar)
EndSelect
}}}
To this:
{{{
Select
	Case $CapNext = 1
		If StringRegExp($s_CurChar, ""[a-zA-ZÀ-ÿ'0-9,]"") Then
			$s_CurChar = StringUpper($s_CurChar)
			$CapNext = 0
		EndIf
	Case Not StringRegExp($s_CurChar, ""[a-zA-ZÀ-ÿ'0-9,]"")
		$CapNext = 1
	Case Else
		$s_CurChar = StringLower($s_CurChar)
EndSelect
}}}
It will give you the output below:
{{{
_StringProper($String) = She's All That I,want (10th Place Of 2)
}}}
Because the layout of this code on the page isn't formatting correctly, I have also attached a script showing the changes."	Feature Request	closed		Standard UDFs		None	Rejected	_StringProper, titlecase	
