Skip to content

Get the length of an attribute value (without the slow strlen) #405

Answered by zeux
muratmat asked this question in Q&A
Discussion options

You must be logged in to vote

pugixml stores all values as zero-terminated strings so strlen is the only option if you do need the length.

Note that to decode the BASE64 contents you don't necessarily need the length - you can just parse the string character by character until reaching the null terminator.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by zeux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #404 on February 05, 2021 16:01.