Skip to main content
deleted 51 characters in body
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18

C (gcc), 104103 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*so=b;*s++;l=*s-34||(l=++n%434?l:++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (clang), 6867 bytes

*l;f(*s,n){for(;*s++;)*s;*s++;l=*s-34||(l=++n%434?l:++n%4?s+1:printf("%.*ls\n",s-l,l));}

Writes the output to stdout instead of returning arrays.

Try it online!Try it online!

C (gcc), 104 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (clang), 68 bytes

*l;f(*s,n){for(;*s++;)*s-34||(l=++n%4?s+1:printf("%.*ls\n",s-l,l));}

Writes the output to stdout instead of returning arrays.

Try it online!

C (gcc), 103 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;l=*s-34?l:++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (clang), 67 bytes

*l;f(*s,n){for(;*s++;l=*s-34?l:++n%4?s+1:printf("%.*ls\n",s-l,l));}

Writes the output to stdout instead of returning arrays.

Try it online!

added 736 characters in body
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18

C (gcc), 104 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (clang), 68 bytes

*l;f(*s,n){for(;*s++;)*s-34||(l=++n%4?s+1:printf("%.*ls\n",s-l,l));}

Writes the output to stdout instead of returning arrays.

Try it online!

C (gcc), 104 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (gcc), 104 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (clang), 68 bytes

*l;f(*s,n){for(;*s++;)*s-34||(l=++n%4?s+1:printf("%.*ls\n",s-l,l));}

Writes the output to stdout instead of returning arrays.

Try it online!

edited body
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18

C (gcc), 106104 bytes

char*b[99],**o,*l;f(char*ss,int n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (gcc), 106 bytes

char*b[99],**o,*l;f(char*s,int n){for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

C (gcc), 104 bytes

char*b[99],**o,*l;f(s,n)char*s;{for(o=b;*s++;)*s-34||(l=++n%4?s+1:(*o++=strndup(l,s-l)));*o=0;return b;}

Try it online!

Usage:

f(input, 2) returns an array with the keys

f(input, 0) returns an array with the values

deleted 22 characters in body
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18
Loading
deleted 22 characters in body
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18
Loading
Source Link
jdt
  • 4.5k
  • 1
  • 14
  • 18
Loading