strNFind Function [AX 2012]
Updated: December 10, 2009
Applies To: Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012
Searches a portion of a text string for the first occurrence of a character that is not included in the specified list of characters.
int strNFind(
str _text,
str _characters,
int _position,
int _number)
|
Parameter |
Description |
|---|---|
|
_text |
The text string to search. |
|
_characters |
The list of characters to exclude from the search. |
|
_position |
The position in the string at which to begin the search. |
|
_number |
A signed number that indicates the direction of the search and how many positions to search. If there is a minus sign preceding _number, the system searches _number characters in reverse order from _position. |
The search is not case-sensitive.
To search from the beginning of the string to the end, use the value of 1 for the _position parameter.
If there is a minus sign preceding the value of the _number parameter, the characters will be searched in reverse order starting from the position specified by the _position parameter.
-
trNFind("ABCDEFGHIJ","ABCDHIJ",1,10); //Returns the value 5 (the position of “E”);
-
strNFind("CDEFGHIJ","CDEFGIJ",10,-10); //Returns the value 6 (the position of "H").
-
strNFind("abcdef","abCdef",3,2) //Returns the value 0.
-
strNFind("abcdef", "abcef",3,2) //Returns the value 4.
The strNFind function is complementary to the strFind function.
Announcements: To see known issues and recent fixes, use Issue search in Microsoft Dynamics Lifecycle Services (LCS).