Reimplement getToken and SplitString as "StringRef helper functions"