Title ( Text ; LeaveEmpty )
Rate this function: Average rating: 3.4 (24 votes) Discuss this Custom Function
Howard Schlossberg, FM Professional Solutions, Inc.
http://fmprosolutions.com
This is similar to FileMaker's built-in Proper() function, but much more practical for the real world. It was created with the proper formatting of song titles in mind, but can also be applied to book or movie titles, headlines and more.
Sample Input:
| Title ( "back in the ussr (the beatles)" ; "" ) |
|
Sample Output:
| "Back in the USSR (The Beatles)" |
|
Description:
This was inspired by the SmarterProper() function (posted on this site by David Tremmel), but whereas that function was more befitting of people's names, I needed something that would also take into consideration that not all words in a song title or headline should be capitalized (ie: a, an, the, and, in, or, etc). And then I realized that some words should always be all upper-case (CD, USA, UK, and certain band names like REM or INXS, etc). So I rewrote David's function from the ground up to accommodate my needs.
This function allows you to easily add additional keywords that should always be lowercase or all-uppercase, depending on your particular needs and/or your users' bad habits.
The function also handles the proper formatting of some names that include some prefixes (ie: McDonald), though it is not properly suited for use with both names and titles (i.e. the prefix 'Mac', as in MacDonald, will also cause the synonym for computer to result in "MacHine"), so be careful here. And it capitalizes the letter after an apostrophe if there are more than just a couple letters after that apostrophe (to handle words like O'Malley without confusing it with Don't).
MORE EXAMPLES:
Title ( "old mcdonald had a farm"; "" ) returns "Old McDonald Had a Farm"
Title ( "o'shea"; "" ) returns "O'Shea"
Title ( "back in the ussr (the beatles)" ; "" ) returns "Back in the USSR (The Beatles)"
Title ( "the world. and more."; "" ) returns "The World. And More."
Title ( "m.i.a."; "" ) returns "M.I.A."
Title ( "19th nervous breakdown"; "" ) results in "19th Nervous Breakdown"
Title ( "more e-mail (don't we love it!)"; "" ) results in "More E-Mail (Don't We Love It!)"
Title ( "LaMond"; "" ) returns LaMond (rather than Lamond; it respects a capital letter that might have intentionally been entered if it comes after a lower-case letter )
Note: these functions are not guaranteed
or supported by BrianDunning.com. Please contact the individual
developer with any questions or problems.
This is my Custom Function and I want to
edit it
Discuss:There are no comments yet. Be the first to post a comment about this Custom Function! Please try to keep it brief & to the point. Anyone can post:
|
Newest Custom Functions:
| 1. |
phpArrayValue ( array ; key ; pos ) |
| |
(Fri, Jan 27, 1:49pm) |
| 2. |
solfm_timeToMinutes (theTime;roundSec) |
| |
(Fri, Jan 20, 6:26am) |
| 3. |
filterLines(filterField;filterValue;Result) |
| |
(Sat, Jan 14, 2:20pm) |
| 4. |
getMaxValue ( theList ) |
| |
(Thu, Jan 12, 1:06pm) |
| 5. |
MiddleWordsIncPunct ( text ; startingWord ; numberOfWords ) |
| |
(Sat, Jan 07, 9:16am) |
| 6. |
WindowInfo |
| |
(Fri, Jan 06, 12:39pm) |
| 7. |
CenterWindow in Window vert horiz (demension) |
| |
(Fri, Jan 06, 12:25pm) |
| 8. |
UTF8_to_TXT ( Text , Platform ) |
| |
(Wed, Dec 28, 10:44pm) |
 |
|