Consider abstracting strlen into a safer function #56

Open
opened 2024-10-06 10:32:05 +00:00 by lda · 0 comments
Contributor

Currently, the only real way to have a C string's length within Cytoplasm is the standard strlen function. However, this function is not required to do any NULL-checking, thus leading to potential pitfalls which should be avoided within Cytoplasm itself, and hence why a function like StrSize may be wanted within Cytoplasm(even if it simply adds a check beforehand).

Then again, this issue may be made non-relevant by #4 (I have already made some basic work for Unicode strings that I've left under CC0, will consider using that as a base for this issue)

Currently, the only real way to have a C string's length within Cytoplasm is the standard `strlen` function. However, this function is not required to do any NULL-checking, thus leading to potential pitfalls which should be avoided within Cytoplasm itself, and hence why a function like `StrSize` may be wanted within Cytoplasm(even if it simply adds a check beforehand). Then again, this issue may be made non-relevant by #4 (I have already made some basic work for Unicode strings that I've left under CC0, will consider using that as a base for this issue)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Telodendria/Cytoplasm#56
No description provided.