Java Reference
In-Depth Information
Returns an Integer value if the String can be interpreted as an Integer, and
null
otherwise. The following example returns
99
.
log
('99'.asInteger().toString());
asFloat
String
::asFloat() :
Float
Returns a Float value if the String can be interpreted as a Float, and
null
otherwise. The following example returns
99.9
.
log
('99.9'.asFloat().toString());
startStrCounter
String
::startStrCounter (s:
String
) :
Void
Creates and initializes a counter with the String. When used with the fol-
lowing counterparts, this operation can provide a convenient means to create
indexes. The following example outputs
0
,
1
,
0
,
1
for the sequence of counter
operations.
var
index :
String
:= 'index';
String
.startStrCounter(index);
log
(
String
.getStrCounter(index).toString());
log
(
String
.incrStrCounter(index).toString());
index.restartAllStrCounter();
log
(
String
.getStrCounter(index).toString());
log
(
String
.incrStrCounter(index).toString());
log
(index.addSuffixNumber());
getStrCounter
String
::getStrCounter (s:
String
) :
Integer
Returns the current value of the counter associated with the String. See the
example in
startStrCounter()
for its usage.
Search WWH ::
Custom Search