What I do is I have a "force" flag where you can specify whether or not you
want to force olny the first letter to be capitalized and the rest lowercase,
or else capitilize the first letter of each word and leave the rest as it is.
Therefore titleCase("mcReary", false) will produce "McReary". Bu
I have just uploaded an improved stack that filters out a list of
reserved words: here:
http://forums.livecode.com/viewtopic.php?f=7&t=30927
Best, Richmond.
On 21/4/2018 5:10 pm, Richmond Mathewson wrote:
I have a stack with 2 fields: the first one "fRAW" contains my
uncapitalised sentence,
Not sure what you mean?
Also, definitely use one of the Andy versions to "case" your titles. Much
more comprehensive solution. The only edge case I can see would be
something like a title with a McGary type name, pretty much impossible to
account for without looking up every word in a names DB.
I have a stack with 2 fields: the first one "fRAW" contains my
uncapitalised sentence,
the second one, "fCOOKED" is where the capitalised sentences ends up.
I have a button called "SORT THINGS OUT" with this script:
on mouseUp
put empty into fld "fCOOKED"
put fld "fRAW" into cRAW
put 1
Hi Richmond,
> Am 21.04.2018 um 15:52 schrieb Richmond Mathewson via use-livecode
> :
>
> Just been playing with this and found that this causes problems:
>
> put "vanish" into rWORD
> put char 1 of rWORD into rC
> toUpper(rC)
>
> the toUpper(rC) throws a "bluey"
toupper() is a FUNCTION, so y
Just been playing with this and found that this causes problems:
put "vanish" into rWORD
put char 1 of rWORD into rC
toUpper(rC)
the toUpper(rC) throws a "bluey"
toUpper works with a string expressed "as itself" in double quotes, but
does not
seem to like a stringVariable . . .
which is a "n
Mike/Andy
that works;
not sure how the eye-candy will to take to
This Is A Title
This is an obscure UI case in which I can't get metadata from the data base,
for a given audio that has been downloaded. So these "titles" come file names
in the "My Audio"
the-guru-chronicles-audiobook_10-Chap
Or maybe
put toupper(char 1 of tolower( trueword i of tTitle) ) into trueword i of tTitle
or
put toupper(char 1 of trueword i of tTitle) & \
tolower(char 2 to -1 of trueword i of tTitle) into trueword i of tTitle
-- Alex.
On 21/04/2018 04:54, Mike Bonner via use-livecode wrote:
Somethi
Something like this might work..
put "a create a sentence title" into tTitle
repeat with i = 1 to the number of truewords in tTitle
put toupper(char 1 of trueword i of tTitle) into char 1 of trueword i of
tTitle
end repeat
put tTitle -- the adjusted case sentence
If you have words that you wou
What to the simplest way to "sentence case"
a create a sentence title
in use toUpper to convert to
A Create A Sentence Titleā¦
BR
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage yo
10 matches
Mail list logo