<div dir="ltr">Hi Cedron,<br>thank you very much for all the suggestions ;-)<br><br>Regards<br>Gianluigi</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 11 set 2019 alle ore 15:32 Cedron Dawg <<a href="mailto:cedron@exede.net">cedron@exede.net</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Because of the "Syntax Sugar" string concatenation thing I would do it somewhat like this:<br>
<br>
'==================================================<br>
Private Function ProperCase(value As String) As String<br>
<br>
  Dim O As Stream, Q As String<br>
<br>
  O = Open String For Write<br>
<br>
  Dim ss As String[] = Split(value, " ")<br>
<br>
  For Each s As String In ss<br>
    Print #O, String.UCaseFirst(s); " ";<br>
  Next<br>
<br>
  Q = Close #O<br>
<br>
  Return RTrim(Q)<br>
<br>
End<br>
'==================================================<br>
<br>
I second the call for a built in "ProperCase" function.<br>
<br>
It would also be nice to have a set of calls back and forth between a ProperCase name and a DB safe name, i.e. all lower case with underscored separators.<br>
<br>
HomeAddress <===> home_address<br>
<br>
Ced<br>
<br>
<br>
----- Original Message -----<br>
From: "Gianluigi" <<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>><br>
<br>
....<br>
<br>
What do you think about these solutions (obviously the second solution is not mine :-P)? <br>
<br>
Private Function ProperCase(value As String) As String <br>
<br>
Dim ss As String[] = Split(value, " ") <br>
<br>
value = "" <br>
For Each s As String In ss <br>
value &= String.UCaseFirst(s) & " " <br>
Next <br>
Return RTrim(value) <br>
<br>
End <br>
<br>
.....<br>
<br>
Benoit, how about adding a new string function? <br>
<br>
Regards <br>
Gianluigi <br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]---- <br>
<br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>