parseNumber"

From Documentation
m
 
Line 11: Line 11:
 
Parses text from the beginning of the given string to produce a number with the given pattern.
 
Parses text from the beginning of the given string to produce a number with the given pattern.
  
There is another extended built-in function,  
+
There is another extended built-in function, <javadoc method="parseNumber(java.lang.String, java.lang.String, java.util.Locale)">org.zkoss.xel.fn.CommonFns</javadoc>, not declared in taglib. Parses text from the beginning of the given string to produce a number with the given pattern and locale.
  
<source lang="java">
+
You can call it by [[ZUML%20Reference/EL%20Expressions/Static%20Fields%20and%20Methods| EL]] or declaring a [[ZUML_Reference/ZUML/Processing_Instructions/xel-method| xel-method]].
Number parseNumber(String source, String pattern, Locale locale);
 
</source>
 
 
 
:i.e., <javadoc method="parseNumber(java.lang.String, java.lang.String, java.util.Locale)">org.zkoss.xel.fn.CommonFns</javadoc>
 
 
 
Parses text from the beginning of the given string to produce a number with the given pattern and locale.
 
 
 
You can define a method to use this function by [http://books.zkoss.org/wiki/ZUML_Reference/ZUML/Processing_Instructions/xel-method xel-method]
 
  
  

Latest revision as of 07:58, 27 May 2021

The default method:

Number parseNumber(String source, String pattern);
i.e., CommonFns.parseNumber(String, String)

Parses text from the beginning of the given string to produce a number with the given pattern.

There is another extended built-in function, CommonFns.parseNumber(String, String, Locale), not declared in taglib. Parses text from the beginning of the given string to produce a number with the given pattern and locale.

You can call it by EL or declaring a xel-method.


Parameters: In both default and extended function:

  • source - the text to parse
  • pattern - the pattern to apply

In extended function only:

  • locale - the locale to apply

Version History

Last Update : 2021/05/27


Version Date Content
6.0.1    



Last Update : 2021/05/27

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.