Functions Index :: C :: CString

[<< up one level]


base :: conversion


CString(val "x", bool "force")


Converts any variable to a string type variable. The function behaves like the String() standard Avisynth function, except that it can accept undefined variables also.


"x": The variable to convert.

"force" (Optional, defaults to false): If true and x is an undefined variable (ie Defined(x) returns false) then the function returns "". Else the function propagates the undefined variable to the caller, ie it returns an undefined value.


f = 12.62

b = false

u = Undef()

s1 = CString(f) # s1 == "12.62"

s2 = CString(b) # i2 == "false"

s3 = CString(u) # Defined(s3) == false

s4 = CString(u, true) # s4 == ""


[<< top]