parseNumberWithFmtAndLcid

parseNumberWithFmtAndLcid(source:    String;
                          fmt:       NumberFormat;
                          lcid:      Integer;
                          errOffset: Integer output): Integer updating;

The parseNumberWithFmtAndLcid method of the Integer primitive type parses the string specified in the source parameter using the specified format and locale, to ensure that it matches the format specified in the fmt parameter for sign character sequence, sign position, thousands separator, decimal point sequence, and character set.

If the value of the fmt parameter is null, the settings for the locale specified in the lcid parameter are used. If the value of the lcid parameter is zero (0), the settings of the current locale are used.

If the value of the source parameter matches the format rules, the method returns zero (0) and sets the receiver to the parsed value. If it does not match the format rules, it returns a JADE error code (parse errors are in the range 1800 through 1869), indicates the first offending character returning its zero-based offset using the output errOffset parameter, and sets the receiver to the invalid value.

The negative sign character sequence is optional but if it is included in the source, it must be correctly positioned. A space included in the sign sequence is optional. There is no positive sign sequence.

Thousands separator character sequences are optional but if they are included in the source, each one must have at least one digit preceding and following it, and must occur before the decimal point (if any).

If native digits are allowed, if the first digit found in the source is a native digit, all subsequent digits must also be native. Similarly, if the first digit found is ASCII, all subsequent digits must also be ASCII.

The value of the source parameter text can include a decimal point and decimal digits, but they must all be zero so that rounding or truncation is not required to store the value in the Integer variable; for example:

If you do not define the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file on the database node or you set it to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are locale overrides, as all overrides on the application server are suppressed if enhanced locale support is not enabled. Formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.