Page 4 of 4

Re: Tip: Creating ProperCase strings

Posted: Mon Jun 13, 2016 11:10 pm
by Tenaja
CharUpper_ and CharLower_ are windows api calls.

Re: Tip: Creating ProperCase strings

Posted: Tue Jun 14, 2016 5:09 am
by wilbert
Just because someone might be able to use it ...
On OSX you can also use the OS to do this

Code: Select all

Procedure.s ProperCase(text.s)
  ProcedureReturn PeekS(CocoaMessage(0, CocoaMessage(0, CocoaMessage(0, 0, "NSString stringWithString:$", @text), "capitalizedString"), "UTF8String"), -1, #PB_UTF8)
EndProcedure

Debug ProperCase("this is a TEST StRiNG")

Re: Tip: Creating ProperCase strings

Posted: Tue Jun 14, 2016 6:56 am
by Frarth
Tenaja wrote:CharUpper_ and CharLower_ are windows api calls.
Yes I know but my question was, do they behave differently.