dbstrsort

Description

Determine which of two character strings should appear first in a sorted list.

Syntax

int dbstrsort(dbproc, str1, len1, str2, len2, 
            sortorder)
 
 DBPROCESS      *dbproc;
 char                      *str1;
 int                          len1;
 char                      *str2;
 int                           len2;
 DBSORTORDER   *sortorder;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.

str1

A pointer to the first character string to compare. str1 may be NULL.

len1

The length, in bytes, of str1. If len1 is -1, str1 is assumed to be null-terminated.

str2

A pointer to the second character string to compare. str2 may be NULL.

len2

The length, in bytes, of str2. If len2 is -1, str2 is assumed to be null-terminated.

sortorder

A pointer to a DBSORTORDER structure allocated using dbloadsort. If sortorder is NULL, dbstrsort compares str1 and str2 using their binary values, just as strcmp does.

Returns

Usage

See also

dbfreesort, dbloadsort, dbstrcmp