| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 String convertToLocalizedNumber(const String&); | 52 String convertToLocalizedNumber(const String&); |
| 53 | 53 |
| 54 // Converts the specified localized number string to a number string in the | 54 // Converts the specified localized number string to a number string in the |
| 55 // HTML floating-point number format. The input string is provided by a end | 55 // HTML floating-point number format. The input string is provided by a end |
| 56 // user, and might not be a number string. It's ok that the function returns | 56 // user, and might not be a number string. It's ok that the function returns |
| 57 // a string which is not conforms to the HTML floating-point number format, | 57 // a string which is not conforms to the HTML floating-point number format, |
| 58 // callers of this function are responsible to check the format of the | 58 // callers of this function are responsible to check the format of the |
| 59 // resultant string. | 59 // resultant string. |
| 60 String convertFromLocalizedNumber(const String&); | 60 String convertFromLocalizedNumber(const String&); |
| 61 | 61 |
| 62 // Remove characters from |input| if a character is not included in |
| 63 // locale-specific number characters and |standardChars|. |
| 64 String stripInvalidNumberCharacters(const String& input, const String& stand
ardChars) const; |
| 65 |
| 62 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 66 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
| 63 // Returns localized decimal separator, e.g. "." for English, "," for French
. | 67 // Returns localized decimal separator, e.g. "." for English, "," for French
. |
| 64 String localizedDecimalSeparator(); | 68 String localizedDecimalSeparator(); |
| 65 #endif | 69 #endif |
| 66 | 70 |
| 67 // Returns date format in Unicode TR35 LDML[1] containing day of month, | 71 // Returns date format in Unicode TR35 LDML[1] containing day of month, |
| 68 // month, and year, e.g. "dd/mm/yyyy" | 72 // month, and year, e.g. "dd/mm/yyyy" |
| 69 // [1] LDML http://unicode.org/reports/tr35/#Date_Format_Patterns | 73 // [1] LDML http://unicode.org/reports/tr35/#Date_Format_Patterns |
| 70 virtual String dateFormat() = 0; | 74 virtual String dateFormat() = 0; |
| 71 | 75 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 159 |
| 156 private: | 160 private: |
| 157 bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsig
ned& startIndex, unsigned& endIndex); | 161 bool detectSignAndGetDigitRange(const String& input, bool& isNegative, unsig
ned& startIndex, unsigned& endIndex); |
| 158 unsigned matchedDecimalSymbolIndex(const String& input, unsigned& position); | 162 unsigned matchedDecimalSymbolIndex(const String& input, unsigned& position); |
| 159 | 163 |
| 160 String m_decimalSymbols[DecimalSymbolsSize]; | 164 String m_decimalSymbols[DecimalSymbolsSize]; |
| 161 String m_positivePrefix; | 165 String m_positivePrefix; |
| 162 String m_positiveSuffix; | 166 String m_positiveSuffix; |
| 163 String m_negativePrefix; | 167 String m_negativePrefix; |
| 164 String m_negativeSuffix; | 168 String m_negativeSuffix; |
| 169 String m_acceptableNumberCharacters; |
| 165 bool m_hasLocaleData; | 170 bool m_hasLocaleData; |
| 166 }; | 171 }; |
| 167 | 172 |
| 168 } // namespace blink | 173 } // namespace blink |
| 169 #endif | 174 #endif |
| OLD | NEW |