log()  offsetCopy()

Chapter 5: General Objects and Methods

offsetCat()

Description

Copies data from the source, starting at offset, and appends it to the string object. The first character in the source is always at an offset of zero.

Syntax

offsetCat(string source, int offset);

Parameter

Description

source

Source of the data to copy. Can be another string object or a literal, enclosed in double-quotes.

offset

Location to begin copying. The first character in a string or literal is always at offset 0.

Return value

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

Usage

Pointer to object

Object

ps->offsetCat(“123abc”,3);

mystring.offsetCat    (my_string_var,5);

Examples

Example 62

string mystr;
mystr = “abcdefg”;
mystr.offsetCat(“123456789”,5);
//mystr now contains “abcdefg6789”




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

View this book as PDF