i am creating a small cpu simulator and i need to parse the assembly instruction which is like "add $s1 $s2 $s3", i need to get these four individual words ignoring the white spaces, if i use string.split(' '), it wont work if user enters more than one space between the words. i think of implementing it using subscript, but there should be easier way.
any ideas?
serkan sendur 821 Postaholic Banned
nmaillet 97 Posting Whiz in Training
serkan sendur commented: very good +3
serkan sendur 821 Postaholic Banned
serkan sendur 821 Postaholic Banned
nmaillet 97 Posting Whiz in Training
serkan sendur 821 Postaholic Banned
serkan sendur 821 Postaholic Banned
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.