unum_formatDouble documentation silent on termination

Description

The documentation of unum_formatDouble says nothing about null-termination: Whether output strings are null-terminated, whether the result value includes the null termination, what happens if resultLength is large enough to allow for all the characters of the formatted string, but not for null-termination.

Activity

Show:
TracBot
June 30, 2018, 11:28 PM
Trac Comment 3 by tkeep—2013-03-21T18:31:09.861Z

Will modify the documentation for unum_formatXXX() methods with something similar to this excerpt form Unicode::extract

If the string fits into dest but cannot be NUL-terminated (length()==destCapacity) then the error code is set to U_STRING_NOT_TERMINATED_WARNING. If the string itself does not fit into dest (length()>destCapacity) then the error code is set to U_BUFFER_OVERFLOW_ERROR.

TracBot
June 30, 2018, 11:28 PM
Trac Comment 2 by tkeep—2013-03-21T18:13:20.658Z

The pattern for unum_formatXXX() in source/i18n/unum.cpp is this:

Fixed

Assignee

TracBot

Reporter

icu@lindenbergsoftware.com

Components

Labels

None

Reviewer

None

Priority

minor

Time Needed

None

Fix versions