utf8.ncasecmp | Multi Theft Auto: Wiki Skip to content

utf8.ncasecmp

Client-side
Server-side
Shared
Needs checking

This function was partially migrated from the old wiki. Please review manually:

  • Missing section: Indicators

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


Compares two strings in lower-case and returns the difference indicator (see table below) as an integer value.

Syntax

utf8.ncasecmp ( )

Code Examples

server

This example shows a simple comparsion of two different strings.

local a = "Hello"
local b = "World"
local result = utf8.ncasecmp( a, b )
if result == -1 then
print( "a < b" ) -- printed
elseif result == 0 then
print( "a == b" )
elseif result == 1 then
print( "a > b" )
end

See Also