summaryrefslogtreecommitdiff
path: root/example/script/find_hello.lua
blob: c4fb80bb79d3589929239d3065b21e92b5d94116 (plain)
1
2
3
4
5
6
7
8
local ss = TSG.data
print("[lua]:the parameter of lua function is '"..ss.."'")
print("[lua]:start find 'hello'...")
local index_s, index_e = string.find(ss, 'hello')   
local str = 'find!'
print("[lua]:result, start at", index_s, ", end at",index_e)                           
print("[lua]: return ", string.len(str), str) 
return string.len(str), str