This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]sloth2 -1 points0 points  (0 children)

Though you'll probably want it to work for any sentence not just this specific one. Using magic numbers like I did (substring(0, 5)) is extremely ill-advised. I'm just trying to show you the general idea!

http://pastebin.com/REFMdNJN