Tokenize a string: Difference between revisions

Content added Content deleted
mNo edit summary
mNo edit summary
Line 3,566: Line 3,566:


<lang Hopper>
<lang Hopper>
''#include <hopper.h>
#include <hopper.h>


#proto splitdate(_DATETIME_)
#proto splitdate(_DATETIME_)
#proto splitnumber(_N_)
#proto splitnumber(_N_)
#proto split(_S_,_T_)''
#proto split(_S_,_T_)


'''main:'''
main:
s="this string will be separated into parts with space token separator"
s="this string will be separated into parts with space token separator"
Line 3,595: Line 3,595:
exit(0)
exit(0)


'''.locals'''
.locals
splitdate(_DATETIME_)
splitdate(_DATETIME_)
_SEP_=0,gettoksep,mov(_SEP_) // "gettoksep" return actual token separator
_SEP_=0,gettoksep,mov(_SEP_) // "gettoksep" return actual token separator