Sv Compare

From the Fallout3 GECK Wiki
Revision as of 17:14, 12 August 2014 by imported>Odessa
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the New Vegas Script Extender.

Description

Compares a formatable string to a string variable. Returns 0 if the strings are equal, 1 if the string variable occurs alphabetically before the formatted string, -1 if the string variable occurs alphabetically after the formatted string, or -2 if the comparison fails. Comparison is case-insensitive by default, with the optional flag reversing this. Added by NVSE 4.1.

Syntax

[help]
(int) Sv_Compare Formatable:string Formatting ToCompareWith:string_var CaseSensitive:bool

Example

string_var my_string

let my_string := "Alpha"

sv_Compare "Beta", my_string ; * returns 1

See Also