forked from solstice/solstice
Add intToString() and stringToInt() functions
This commit is contained in:
@@ -28,6 +28,22 @@ def println(string msg) string {
|
||||
return msg
|
||||
}
|
||||
|
||||
def stringToInt(string in) int {
|
||||
result = 0
|
||||
ground {
|
||||
stoi $in &result
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
def intToString(int in) string {
|
||||
result = ""
|
||||
ground {
|
||||
tostring $in &result
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
// End Solstice stdlib
|
||||
|
||||
)";
|
||||
|
||||
Reference in New Issue
Block a user