Lines Matching refs:dest
12 // Copies 'src' to 'dest', escaping dangerous characters using
13 // C-style escape sequences. 'src' and 'dest' should not overlap.
14 // Returns the number of bytes written to 'dest' (not including the \0)
17 int CEscapeString(const char* src, int src_len, char* dest,
28 case '\n': dest[used++] = '\\'; dest[used++] = 'n'; break;
29 case '\r': dest[used++] = '\\'; dest[used++] = 'r'; break;
30 case '\t': dest[used++] = '\\'; dest[used++] = 't'; break;
31 case '\"': dest[used++] = '\\'; dest[used++] = '\"'; break;
32 case '\'': dest[used++] = '\\'; dest[used++] = '\''; break;
33 case '\\': dest[used++] = '\\'; dest[used++] = '\\'; break;
41 sprintf(dest + used, "\\%03o", c);
44 dest[used++] = c; break;
52 dest[used] = '\0'; // doesn't count towards return value though
60 // C-style escape sequences. 'src' and 'dest' should not overlap.
64 char* dest = new char[dest_length];
66 dest, dest_length);
67 string s = string(dest, len);
68 delete[] dest;