strrtt()  substr()

Chapter 5: General Objects and Methods

strrem()

Description

Removes the first occurrence of the pattern from the string. This method is case-sensitive.

Syntax

strrem(string pattern);

Parameter

Description

pattern

Pattern for which to search. Can be a literal value or another string object.

Return value

Integer. Returns 1 for success, and 0 for failure.

Usage

Pointer to object

Object

string digest;

string digest;

digest = “3RR56”;

digest = “Abc-334”;

ps->strrem (digest);

mystring.strrem (digest);

ps->strrem (“a literal value”);

mystring.strrem (“PR-01”);

Examples

Example 67

string mystr;
mystr = “hello sir/goodbye sir”
mystr.strrem(“sir”);
//mystr now contains “hello /goodbye sir”




Copyright © 2005. Sybase Inc. All rights reserved. substr()

View this book as PDF