Sv Length

From GECK
Jump to: navigation, search


A function added by the New Vegas Script Extender.

Description

Returns the length of a string variable, which is the number of characters it contains.

Returns -1 if the string was invalid.

Syntax

[help]
(int) Sv_Length ToMeasure:string_var 

Example

string_var my_string

let my_string := "Ringo"

Sv_Length my_string ; returns 5

Notes

  • Remember that strings are indexed from 0, so the location of the final character is always:
    Sv_Length my_string - 1

See Also