Siebel eScript Language Reference > Siebel eScript Commands > Clib Object Buffer Methods in Siebel eScript >

Clib.memcmp() Method


This method compares the contents of two buffers or the length of two buffers.

Syntax

Clib.memcmp(buf1, buf2[, length])

Parameter
Description

buf1

A variable containing the name of the first buffer to be compared

buf2

A variable containing the name of the second buffer to be compared

length

The number of bytes to compare

Returns

A negative number if buf1 is less than buf2, 0 if buf1 is the same as buf2 for length bytes, a positive number if buf1 is greater than buf2.

Usage

If length is not specified, Clib.memcmp() compares the length of the two buffers. It then compares the contents up to the length of the shorter buffer. If length is specified and one of the buffers is shorter than length, comparison proceeds up to the length of the shorter buffer.

Siebel eScript Language Reference Copyright © 2007, Oracle. All rights reserved.