Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ICECREAM_PRINT_CHAR_ARRAY_AS_STRING to print char array as string. #35

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sunduk
Copy link

@sunduk sunduk commented Jan 9, 2023

Add new feature to print char array to one line.

IC("abcdefghijklmn");

char text[128] = "abcdefghijklmn";
IC(text);

#define ICECREAM_PRINT_CHAR_ARRAY_AS_STRING

output:
 ic| "abcdefghijklmn": abcdefghijklmn
 ic| text: abcdefghijklmn

//#define ICECREAM_PRINT_CHAR_ARRAY_AS_STRING

output:
 ic| "abcdefghijklmn": [
         'a',
         'b',
         'c',
         'd',
         'e',
         'f',
         'g',
         'h',
         'i',
         'j',
         'k',
         'l',
         'm',
         'n',
         '\0'
     ]
 ic| text: [
         'a',
         'b',
         'c',
         'd',
         'e',
         'f',
         'g',
         'h',
         'i',
         'j',
         'k',
         'l',
         'm',
         'n',
         '\0',
         '\0',
         ...
     ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant