Equinox Online Help - Language Reference - A to Z
Right [Statement] |
|
---|---|
Applies to | |
Syntax | Right(StringItem, SectionExpression) = NewExpression |
Action | [Statement] Assigns to the rightmost portion of a string. |
Scope | Usable anywhere. |
Notes | You can use this statement to assign a value to the rightmost portion of StringItem. SectionExpression defines the number of characters that are replaced. The rightmost characters (defined by SectionExpression) are removed from StringItem. NewExpression is then inserted at the end of StringItem, in a cut-and-paste style operation. You cannot insert characters beyond the maximum size of StringItem (remember that trailing spaces in fields and workareas are ignored). This statement works in a similar way as the [ ] notation, which you can use to assign to a single character in a string. Note that you can also use Right as a function, to return part of a string. This feature is described separately, in the previous section. |
Category | String handling |
See Also | ChrList, Chrs, Compare, Fill, IsNumber, Left_Function, Left_statement, Len, Match, Maxlen, Mid_Function, Mid_Satement, Remove, Replace, Right_Function], Search_SearchNext, SetLen, SetMaxLen, SortOrder, SubstituteData |
Example | The following example changes the contents of the string txt from "statement" to "function". string txt |