Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void keyValueSeparator(char* str, char** key, char** val) {
- int i = 0, j = 0, k = 0;
- int beforeEq = 1;
- *key = new char[1000];
- *val = new char[1000];
- while (str[i] != '\0') {
- if (str[i] == '=') {
- beforeEq = 0;
- }
- else {
- if (beforeEq) {
- (*key)[j++] = str[i];
- }
- else {
- (*val)[k++] = str[i];
- }
- }
- i++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement