Jump to content

FSH FINDCHAR: Difference between revisions

From EDM2
Created page with "This function provides the mechanism to find the first occurrence of any one of a set of characters in an ASCIIZ string, taking into account DBCS considerations. ==Syntax=..."
 
Ak120 (talk | contribs)
mNo edit summary
 
Line 1: Line 1:
This function provides the mechanism to find the first occurrence of any one of a set of characters in an ASCIIZ string, taking into account DBCS considerations.  
{{DISPLAYTITLE:FSH_FINDCHAR}}
This function provides the mechanism to find the first occurrence of any one of a set of characters in an ASCIIZ string, taking into account DBCS considerations.


==Syntax==
==Syntax==
  FSH_FINDCHAR(nChars, pChars, ppStr)
  FSH_FINDCHAR(nChars, pChars, ppStr)
==Parameters==
==Parameters==
;nChars: is the number of characters in the search list.  
;nChars: is the number of characters in the search list.
 
;pChars: is the array of characters to search for. These cannot be DBCS characters.
;pChars: is the array of characters to search for. These cannot be DBCS characters.  
:The NUL character cannot be searched for.
 
;ppSTR: is the pointer to the character pointer where the search is to begin. This pointer is updated upon return to point to the character found. This must be an ASCIIZ string.
:The NUL character cannot be searched for.  


;ppSTR: is the pointer to the character pointer where the search is to begin . This pointer is updated upon return to point to the character found. This must be an ASCIIZ string.
==Returns==
==Returns==
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:  
If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:
*ERROR_CHAR_NOT_FOUND :indicates none of the characters were found.


:*ERROR_CHAR_NOT_FOUND
::indicates none of the characters were found.
==Calling Sequence==
==Calling Sequence==
<PRE>
<PRE>
int far pascal FSH_FINDCHAR(nChars, pChars, ppStr)
int far pascal FSH_FINDCHAR(nChars, pChars, ppStr)


Line 25: Line 23:
char far * far * ppStr;
char far * far * ppStr;
</PRE>
</PRE>
==Remarks==
==Remarks==
The search will continue until a matching character is found or the end of the string is found.  
The search will continue until a matching character is found or the end of the string is found.
 
The FSD is responsible for verifying the string pointers and checking for segment boundaries. 


;Note: OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.  
The FSD is responsible for verifying the string pointers and checking for segment boundaries.


;Note: OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.


[[Category:IFS Interfaces]]
[[Category:IFS Interfaces]]
{{DISPLAYTITLE:FSH_FINDCHAR}}

Latest revision as of 22:09, 12 February 2020

This function provides the mechanism to find the first occurrence of any one of a set of characters in an ASCIIZ string, taking into account DBCS considerations.

Syntax

FSH_FINDCHAR(nChars, pChars, ppStr)

Parameters

nChars
is the number of characters in the search list.
pChars
is the array of characters to search for. These cannot be DBCS characters.
The NUL character cannot be searched for.
ppSTR
is the pointer to the character pointer where the search is to begin. This pointer is updated upon return to point to the character found. This must be an ASCIIZ string.

Returns

If no error is detected, a zero error code is returned. If an error is detected, one of the following error codes is returned:

  • ERROR_CHAR_NOT_FOUND :indicates none of the characters were found.

Calling Sequence

int far pascal FSH_FINDCHAR(nChars, pChars, ppStr)

unsigned short nChars;
char far * pChars;
char far * far * ppStr;

Remarks

The search will continue until a matching character is found or the end of the string is found.

The FSD is responsible for verifying the string pointers and checking for segment boundaries.

Note
OS/2 does not validate input parameters. An FSD, therefore, should call FSH_PROBEBUF where appropriate.