Differences From Artifact [18fc9bbd71]:
- File
src/OFString.h
— part of check-in
[94f1f0f479]
at
2020-04-21 22:47:25
on branch trunk
— OFWindowsRegistryKey: Compatibility with Win XP
This requires a slight API change to OFWindowsRegistryKey, as the
previous API was depending on RegGetValueW(), which is not available on
Windows XP. (user: js, size: 41484) [annotate] [blame] [check-ins using] [more...]
To Artifact [0749f31524]:
- File
src/OFString.h
— part of check-in
[b6ee372b98]
at
2020-08-11 19:45:36
on branch trunk
— OFString: Rework number parsing API
This solves the old signed vs. unsigned problem and allows for more
bases than just 8, 10 and 16, as well as auto-detection of the base (if
base is 0). (user: js, size: 42556) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
167 168 169 170 171 172 173 | * @note This only considers spaces, tabs and newlines to be word delimiters! * Also note that this might change in the future to all word delimiters * specified by Unicode! */ @property (readonly, nonatomic) OFString *capitalizedString; /*! | | | | | | < < < < < < < < < < < < < | | 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | * @note This only considers spaces, tabs and newlines to be word delimiters! * Also note that this might change in the future to all word delimiters * specified by Unicode! */ @property (readonly, nonatomic) OFString *capitalizedString; /*! * @brief The decimal value of the string as a `long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into an `long long`, an * @ref OFOutOfRangeException is thrown. */ @property (readonly, nonatomic) long long longLongValue; /*! * @brief The decimal value of the string as an `unsigned long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into an `unsigned long long`, an * @ref OFOutOfRangeException is thrown. */ @property (readonly, nonatomic) unsigned long long unsignedLongLongValue; /*! * @brief The float value of the string as a float. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. */ |
︙ | ︙ | |||
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 | * @brief Creates a substring with the specified range. * * @param range The range of the substring * @return The substring as a new autoreleased OFString */ - (OFString *)substringWithRange: (of_range_t)range; /*! * @brief Creates a new string by appending another string. * * @param string The string to append * @return A new, autoreleased OFString with the specified string appended */ - (OFString *)stringByAppendingString: (OFString *)string; | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 | * @brief Creates a substring with the specified range. * * @param range The range of the substring * @return The substring as a new autoreleased OFString */ - (OFString *)substringWithRange: (of_range_t)range; /*! * @brief The value of the string in the specified base as a `long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into an `long long`, an * @ref OFOutOfRangeException is thrown. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The value of the string in the specified base */ - (long long)longLongValueWithBase: (int)base; /*! * @brief The value of the string in the specified base as an * `unsigned long long`. * * Leading and trailing whitespaces are ignored. * * If the string contains any non-number characters, an * @ref OFInvalidFormatException is thrown. * * If the number is too big to fit into an `unsigned long long`, an * @ref OFOutOfRangeException is thrown. * * @param base The base to use. If the base is 0, base 16 is assumed if the * string starts with 0x (after stripping white spaces). If the * string starts with 0, base 8 is assumed. Otherwise, base 10 is * assumed. * @return The value of the string in the specified base */ - (unsigned long long)unsignedLongLongValueWithBase: (int)base; /*! * @brief Creates a new string by appending another string. * * @param string The string to append * @return A new, autoreleased OFString with the specified string appended */ - (OFString *)stringByAppendingString: (OFString *)string; |
︙ | ︙ |