Author |
Topic ![Next Topic Next Topic](images/icon_go_right.gif) |
|
bobby131313
Senior Member
![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif)
USA
1163 Posts |
Posted - 24 May 2020 : 20:07:50
|
So I scrounged this function up many, many years ago and it works great....
This capitalizes every letter after a space.
I would like it to also capitalize letters after a dash. I played with it for several hours yesterday but obviously functions are not my strong suit. |
Switch the order of your title tags |
Edited by - bobby131313 on 24 May 2020 20:08:07 |
|
HuwR
Forum Admin
![](images/icon_star_gold.gif) ![](images/icon_star_gold.gif) ![](images/icon_star_gold.gif) ![](images/icon_star_gold.gif) ![](images/icon_star_gold.gif)
United Kingdom
20584 Posts |
Posted - 26 May 2020 : 07:33:10
|
You will probably need to do the replacement twice, you could try changing your function so that it also accepts a variable that it is to use as the separator, you can then call the same function twice by passing it a space and then a dash
so, declare the function like Function TitleCase(stValue, stSeparator) and the do while would change to Do While InStr(iPos, stValue, stSeparator, 1) <> 0 and the same for the iSpace = InStr(iPos, stValue, " ", 1) change to iSpace = InStr(iPos, stValue, stSeparator, 1) |
MVC .net dev/test site | MVC .net running on Raspberry Pi |
![Go to Top of Page Go to Top of Page](images/icon_go_up.gif) |
|
bobby131313
Senior Member
![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif) ![](images/icon_star_purple.gif)
USA
1163 Posts |
|
Carefree
Advanced Member
![](images/icon_star_silver.gif) ![](images/icon_star_silver.gif) ![](images/icon_star_silver.gif) ![](images/icon_star_silver.gif) ![](images/icon_star_silver.gif)
Philippines
4207 Posts |
Posted - 28 May 2023 : 05:02:24
|
Antique topic, but this would work:
|
![Go to Top of Page Go to Top of Page](images/icon_go_up.gif) |
|
|
Topic ![Next Topic Next Topic](images/icon_go_right.gif) |
|
|
|