Utf8.title: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (add case folding note)
m (make note a note box)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Shared function}}
{{Shared function}}
{{Note|You may want to read up on [https://www.w3.org/International/wiki/Case_folding case folding]}}
{{Note box|You may want to read up on [https://www.w3.org/International/wiki/Case_folding case folding] for more information about the use of this function.}}
Converts a UTF-8 string to title case (uppercase). If ''input'' is an integer, it is treated as a code point and a converted code point (number) is returned.
Converts a UTF-8 string to title case (uppercase). If ''input'' is an integer, it is treated as a code point and a converted code point (number) is returned.



Revision as of 18:17, 15 February 2016

This template is no longer in use as it results in poor readability. Converts a UTF-8 string to title case (uppercase). If input is an integer, it is treated as a code point and a converted code point (number) is returned.

Syntax

string utf8.upper ( string|int input )
string utf8.title ( string|int input )

Required Arguments

  • input: A string character sequence OR an integer value

Returns

Returns a string in uppercase.

Example

Click to collapse [-]
Client

This example shows how to convert a string to uppercase.

local output = utf8.upper( "WHAT ARE YOU UP TO? Do you like uppercase?" )
outputConsole( output ) -- WHAT ARE YOU UP TO? DO YOU LIKE UPPERCASE?

local value = utf8.title( 1088 )
outputConsole( value, type( value ) ) -- 1056, number

See Also