strchr()  strrchr()

Chapter 5: General Objects and Methods

strlft()

Description

Truncates a string from the left, up to and including the first occurrence of pattern. This method is case-sensitive.

Syntax

strlft(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->strlft (digest);

mystring.strlft (digest);

ps->strlft (“some literal value”);

mystring.strlft (“PR-01”);

Examples

Example 65

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




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

View this book as PDF