Rtrim: Difference between revisions
Jump to navigation
Jump to search
Line 27: | Line 27: | ||
var Spacey; | var Spacey; | ||
Spacey = "K "; | Spacey = "K "; | ||
NSB.Print("(" + Spacey + ") | NSB.Print("(" + Spacey + ")"); | ||
NSB.Print("(" + Spacey.rtrim() + ") | NSB.Print("(" + Spacey.rtrim() + ")"); | ||
</pre> | </pre> | ||
Revision as of 21:34, 19 May 2013
RTrim(string)
Description
RTrim returns string with all trailing spaces removed. The required parameter, string, is any valid string expression.
Example
Rem RTrim Example 'RTrim trims all trailing spaces Dim Spacey Spacey = "K " Print "(" & Spacey & ")" Print "(" & RTrim(Spacey) & ")"
Example (JavaScript)
// RTrim Example /* RTrim trims all trailing spaces */ String.prototype.rtrim = function() { return this.replace(/\s+$/,""); } var Spacey; Spacey = "K "; NSB.Print("(" + Spacey + ")"); NSB.Print("(" + Spacey.rtrim() + ")");
Output
(K ) (K)