summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-01-15 04:28:10 +0000
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-01-15 04:28:10 +0000
commit7f6b062e9f51c98e56713b1869c01573d7fe855f (patch)
treec372c947728a08361f2a5575d2f50cd9cf80cb08 /docs
parent783af7926420e17f10d80d74cf3459b2c87d2541 (diff)
Implement automatic hexadecimal decoding for xml_attribute::as_int and xml_text::as_int. This is effectively a form of strtol with base 0, but without octal support.
git-svn-id: http://pugixml.googlecode.com/svn/trunk@958 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'docs')
-rw-r--r--docs/manual.qbk2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/manual.qbk b/docs/manual.qbk
index 587c2b4..820b9e7 100644
--- a/docs/manual.qbk
+++ b/docs/manual.qbk
@@ -882,7 +882,7 @@ In many cases attribute values have types that are not strings - i.e. an attribu
float xml_attribute::as_float(float def = 0) const;
bool xml_attribute::as_bool(bool def = false) const;
-`as_int`, `as_uint`, `as_double` and `as_float` convert attribute values to numbers. If attribute handle is null or attribute value is empty, `def` argument is returned (which is 0 by default). Otherwise, all leading whitespace characters are truncated, and the remaining string is parsed as a decimal number (`as_int` or `as_uint`) or as a floating point number in either decimal or scientific form (`as_double` or `as_float`). Any extra characters are silently discarded, i.e. `as_int` will return `1` for string `"1abc"`.
+`as_int`, `as_uint`, `as_double` and `as_float` convert attribute values to numbers. If attribute handle is null or attribute value is empty, `def` argument is returned (which is 0 by default). Otherwise, all leading whitespace characters are truncated, and the remaining string is parsed as an integer number in either decimal or hexadecimal form (`as_int` or `as_uint`; hexadecimal format is used if the number has `0x` or `0X` prefix) or as a floating point number in either decimal or scientific form (`as_double` or `as_float`). Any extra characters are silently discarded, i.e. `as_int` will return `1` for string `"1abc"`.
In case the input string contains a number that is out of the target numeric range, the result is undefined.