Skip to content

Tokenize an array#29

Open
Kofi-Awuah2020 wants to merge 1 commit intocodemindshub:masterfrom
Kofi-Awuah2020:tokenized
Open

Tokenize an array#29
Kofi-Awuah2020 wants to merge 1 commit intocodemindshub:masterfrom
Kofi-Awuah2020:tokenized

Conversation

@Kofi-Awuah2020
Copy link

A team solution of breaking a string into substrings using the strtok function.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take note of the following text:

static char *array_token[1024];

Upon inspection of the aforementioned line, I noticed that it would be better to allocate only the necessary amount of memory for tokenizing strings. Therefore, please adjust your solution to determine the precise amount of memory needed for the string that requires tokenizing.

Additionally, I would like to know if you have tested your function and what your findings were. I noticed a few bugs and I'm interested to know if you can confirm that your solution works.

Furthermore, I observed that your solution lacks memory deallocation for the temporary variable used. Also, you do not allocate memory for each token. As a result, your solution requires further work. However, I am willing to see how it performs based on your testing.

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.

2 participants