Siebel eScript Language Reference > C Language Library Reference > Clib Buffer Methods >

Clib Get Memory Method


The Clib Get Memory method searches a buffer for the first occurrence of a character that you specify. It returns one of the following values:

  • If it finds the character you specify, then it returns the contents of the buffer starting at that character.
  • If it does not find the character you specify, then it returns the following value:

    Null

Format

Clib.memchr(bufferVar, char[, size])

Table 160 describes the arguments for the Clib Get Memory method.

Table 160. Arguments for the Clib Get Memory Method
Argument
Description

bufferVar

A buffer or a variable that references a buffer.

char

The character that this method attempts to locate.

size

The number of bytes of the buffer that this method searches. It does one of the following depending on if you specify a size:

  • You do specify a size. It searches at the beginning of the buffer and continues until it reaches the point in the buffer that you indicate in the size argument. For example, if you specify the size as 1024, then it searches the first 1024 bytes of the buffer.
  • You do not specify a size. It searches the entire buffer from the first byte.
Siebel eScript Language Reference Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.