Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nlinfo(3X)

mpnls(5)

nlfindstr(3X)

NAME

nlfindstr() − search for a string in another string using the MPE character set definition

SYNOPSIS

#include <portnls.h>

short int nlfindstr(

short int langid,
const char *string1,
short int length1,
const char *string2,
short int length2,
unsigned short int err[2],
const char *charset

);

DESCRIPTION

nlfindstr() searches for the first occurrence of a given string of characters in another character string. 

Arguments to nlfindstr() are:

langid The ID number of the desired language. 

string1 A pointer to the character buffer to be searched.  It can contain single-byte and two-byte characters. 

length1 Length (in bytes) of string1.

string2 The character buffer for which to search. 

length2 Length (in bytes) of string2. length2 must be less than or equal to length1.

err The first element of this array contains the error number.  The second element is always zero.  If the call is successful, both elements contain zero. 

Error # Meaning

2 Specified language is not configured. 

3 Invalid length1 parameter. 

4 Invalid length2 parameter. 

charset A byte buffer containing the character set definition for the language to be used, as returned by nlinfo(3X)’s itemnumber 12. 

RETURN VALUE

offset is a short integer that holds the number of bytes into string1 where string2 was found.  nlfindstr() returns −1 if the string is not found. 

WARNINGS

This routine is provided for compatibility with MPE, a proprietary HP operating system.  See portnls(5) for more information on the use of this routine. Use the Native Language Support routines for C programmers described by hpnls(5) for HP-UX NLS support. 

AUTHOR

nlfindstr() was developed by HP. 

SEE ALSO

nlinfo(3X), mpnls(5). 

EXTERNAL INFLUENCES

International Code Set Support

Single- and multi-byte character code sets are supported. 

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026