[Top]
predef::
|
Method `/()
- Method
`/
-
mixed `/(object arg1, mixed arg2)
mixed `/(mixed arg1, object arg2)
array(string) `/(string arg1, int arg2)
array(string) `/(string arg1, float arg2)
array(array) `/(array arg1, int arg2)
array(array) `/(array arg1, float arg2)
array(string) `/(string arg1, atring arg2)
array(array) `/(array arg1, array arg2)
float `/(float arg1, int|float arg2)
float `/(int arg1, float arg2)
int `/(int arg1, int arg2)
mixed `/(mixed arg1, mixed arg2, mixed ... extras)
- Description
-
Division operator.
- Returns
-
If there are more than two arguments, the result will be
`/(`/(arg1 , arg2 ), @extras ) .
If arg1 is an object that implements lfun::`/() , that
function will be called with arg2 as the single argument.
If arg2 is an object that implements lfun::``/() , that
function will be called with arg1 as the single argument.
Otherwise the result will be as follows:
arg1 can have any of the following types:
string | arg2 can have any of the following types:
int|float | The result will be and array of arg1 split in segments
of length arg2 . If arg2 is negative the splitting
will start from the end of arg1 .
|
string | The result will be an array of arg1 split at each
occurrence of arg2 . Note that the segments that
matched against arg2 will not be in the result.
|
|
|
array | arg2 can have any of the following types:
int|float | The result will be and array of arg1 split in segments
of length arg2 . If arg2 is negative the splitting
will start from the end of arg1 .
|
array | The result will be an array of arg1 split at each
occurrence of arg2 . Note that the elements that
matched against arg2 will not be in the result.
|
|
|
float|int | The result will be arg1 / arg2 . If both arguments
are int, the result will be truncated to an int. Otherwise the
result will be a float.
|
|
|