Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 326c6b2602
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (29 sloc) 0.666 kb
Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights
embodied in the content of this file are licensed under the BSD
(revised) open source license
#include <strings.h>
#include "parse_primitives.h"
#include <iostream>
using namespace std;
void tokenize(char delim, substring s, v_array<substring>& ret)
char *last = s.begin;
for (; s.begin != s.end; s.begin++) {
if (*s.begin == delim) {
if (s.begin != last)
substring temp = {last, s.begin};
push(ret, temp);
last = s.begin+1;
if (s.begin != last)
substring final = {last, s.begin};
push(ret, final);
Jump to Line
Something went wrong with that request. Please try again.