Trail: PROIV Documentation > Developer > PROIV Developer > Developing Functions > Events and Logic > MIXED_CASE_UTF8

Purpose

Converts a string to mixed case respecting any UTF-8 characters it contains. If UTF-8 characters have mixed case equivalents then these are used.

Syntax

#Success = MIXED_CASE_UTF8(String-Expression, String-Variable)

Operation

Returns one if successful or zero if failure (e.g. encountered invalid UTF-8). The first argument is a string expression that may contains UTF-8 characters. The second argument must be a string variable that is overwritten with mixed case version of the first argument.

Remarks
 

The same variable may be used for both arguments. The second argument cannot be a value variable. If the function fails then the second argument may be partially updated with what could be converted. Some UTF-8 characters are composites of two other characters e.g. "Dz". If a word begins with a composite character then then entire UTF-8 character should not be upper case, only first letter in the composite character. This is called title case. So a composite UTF-8 character can have lower, upper and title case versions. This function use title case instead of upper case. If the UTF-8 character is not a composite then it is the same as upper case.

Example
 

if MIXED_CASE_UTF8($A + $B, $C) then

  umsg("$C ='" + $C + "'", -1)

else

  umsg("MIXED_CASE_UTF8 failed - invalid UTF-8?", -1)

endif

Comment on this topic

Topic ID: 520333