summaryrefslogtreecommitdiff
path: root/comp/lucas-standen-NEA/writeup2/examples/str_example.zpy
blob: 9d2abd1c3c1198d3a7f10bfed0aaebb6784481b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(defun main int)
	(let str:string* (String "hello_world"))
	(printstr str->_str)
	(printchar '\n')

	(let strs:string** (str->split str '_'))

	(printstr strs[0]->_str)
	(printchar '\n')
	(printstr strs[1]->_str)
	(printchar '\n')

	(strs[0]->free strs[0])
	(strs[1]->free strs[1])
	(free strs)
	(str->free str)
(endfun)