We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
The * operator is used for multiplying two numeric types.
*
1 * 2
The * operator can be defined for non-numeric types or type combinations with the following:
func __multiply__(a $A, b $B) $C
where $A, $B and $C are any valid types
$A
$B
$C
See __multiply__ for more information.
__multiply__
A common usage of the * operator (for non-numeric types) is repeating a String value:
String
"\n" * 10
Allowed by the following definition:
func __multiply__(lhs String, times int) String
Table of Contents