Core Function Reverse
From Sputnik Wiki
				
				
				(Difference between revisions)
				
																
				
				
								
				 (→Example)  | 
		 (→Example)  | 
		||
| Line 36: | Line 36: | ||
$a->Reverse();  | $a->Reverse();  | ||
say $a; // olleH  | say $a; // olleH  | ||
| + | // There is no return value if you do this  | ||
</syntaxhighlight>  | </syntaxhighlight>  | ||
[[Category:Core Function]]  | [[Category:Core Function]]  | ||
Revision as of 01:26, 12 September 2013
Reverse( <expression> )
Contents | 
Description
Reverse all characters in a string.
Parameters
expression
The string to use.
Return Value
Success: Returns new string.
Failure: Returns old string.
Remarks
None.
Example
$str = "The quick brown fox"; MsgBox( Reverse($str) );
Modify the string in place
$a = "Hello"; say $a; // Hello $a->Reverse(); say $a; // olleH // There is no return value if you do this