1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

String: Fix documentation for getTrailingIntValue

This commit is contained in:
reuk 2021-01-27 17:24:34 +00:00
parent 091ab8a3a3
commit c41149f48d
No known key found for this signature in database
GPG key ID: 9ADCD339CFC98A11
2 changed files with 4 additions and 1 deletions

View file

@ -2577,6 +2577,8 @@ public:
expect (String (std::numeric_limits<int64>::max()).getLargeIntValue() == std::numeric_limits<int64>::max());
expect (String (std::numeric_limits<int64>::min()).getLargeIntValue() == std::numeric_limits<int64>::min());
expect (("xyz" + s).getTrailingIntValue() == s.getIntValue());
expect (String ("xyz-5").getTrailingIntValue() == -5);
expect (String ("-12345").getTrailingIntValue() == -12345);
expect (s.getHexValue32() == 0x12345678);
expect (s.getHexValue64() == (int64) 0x12345678);
expect (String::toHexString (0x1234abcd).equalsIgnoreCase ("1234abcd"));

View file

@ -1049,7 +1049,8 @@ public:
This will look for a value at the end of the string.
e.g. for "321 xyz654" it will return 654; for "2 3 4" it'll return 4.
Negative numbers are not handled, so "xyz-5" returns 5.
If the string ends with a hyphen followed by numeric characters, the
return value will be negative.
@see getIntValue
*/