Equinox Online Help - Language Reference - A to Z
BeforeStr [Statement] |
|
---|---|
Applies to | |
Syntax | (TargetString, SearchString [, IgnoreCaseExpression]) = ReplacementExpression |
Action | [Statement] Replaces the substring of TargetString before SearchString with ReplacementExpression. |
Scope | Usable anywhere |
Notes | This function searches for SearchString in TargetString, and if found returns all the characters in TargetString before SearchString begins. If SearchString is zero length or is not found, it returns a zero length string. IgnoreCaseExpression can have any of the following values:is supplied and is nonzero, case is ignored during the search. If it is not supplied or zero, case is not ignored.
To specify more than one attribute add these numbers together. |
Category | String handling |
See Also | AfterStr_Function, AfterStr_Statement, BeginsWith, BetweenStr_Statement, BeforeStr_Function, BetweenStr_Function |
Example | The following example prints the string "Hello": Print BeforeStr("Hello John", " John") This example removes everything before the phrase "top secret", if it is found in the string: BeforeStr(text, "top secret", 1) = "" This example prints the string "My dog has" Print BeforeStr("My dog has no nose","has",3) |