Skip to content

Add utstring_truncate, analogous to man (2) truncate - #46

Open
njwhite wants to merge 1 commit into
troydhanson:masterfrom
njwhite:master
Open

Add utstring_truncate, analogous to man (2) truncate#46
njwhite wants to merge 1 commit into
troydhanson:masterfrom
njwhite:master

Conversation

@njwhite

@njwhite njwhite commented Dec 2, 2014

Copy link
Copy Markdown

I found this useful when repeatedly appending different suffixes (using utstring_bincpy) to a UT_string.

Comment thread src/utstring.h

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Are you sure this condition is correct? It seems like you want something like
if ((size_t)(amt)+1 > (s)->n)

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