UtfSeek: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 17: Line 17:


===Example===
===Example===
<section name="Example" class="both" show="true"></section>
<section name="Example" class="both" show="true">
<syntaxhighlight lang="lua">
local string = "Hello World"
local seek = utfSeek ( string, 5 )
outputChatBox ( seek )
</syntaxhighlight></section>


==See Also==
==See Also==
{{Utility_functions}}
{{Utility_functions}}

Revision as of 13:28, 11 August 2014

Accessories-text-editor.png Script Example Missing Function UtfSeek needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

The function returns the byte position at specified character position.

Syntax

int utfSeek ( string theString, int position )

Required Arguments

  • theString: The string.
  • position: An int with the specified charachter position.

Returns

Returns an int if the function was successful, false otherwise.

Example

Click to collapse [-]
Example
local string = "Hello World"
local seek = utfSeek ( string, 5 )
outputChatBox ( seek )

See Also