Class: string
Lua
C++
Edit

string:ToFloat()

This method converts the string into a floating point value.

Syntax

float = string:ToFloat()

Returns

Example

local str = "3.14"
local floatValue = str:ToFloat()
print(floatValue) -- Output: 3.14
Copyright © 2024 Ultra Software.
All rights reserved.