Table: | For specifying the constraint |
+ combination: | For specifying the letter case of the constraint |
+ combination: | For restricting the constraint |
MIL_ID ContextId, | //in |
MIL_INT StringIndex, | //in |
MIL_INT CharPos, | //in |
MIL_INT64 ConstraintType, | //in |
const void *CharListPtr | //in |
This function specifies the constraint to apply to a specified character of a specified string or of all strings.
Each constraint must include at least one character existing in one of the selected fonts. For example, if the constraint is M_DIGIT then at least one of the fonts must contain a digit.
Specifies the String Reader context with which to associate the constraint. The String Reader context must have been previously allocated on the required system using MstrAlloc().
Specifies the string(s) in the String Reader context to affect.
Note that a new string can be added to the String Reader context using MstrControl() with M_STRING_ADD.
This parameter should be set to the following value:
For specifying the string index
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
Specifies that the constraint will be applied to a string or to all strings. (summarize)Specifies that the constraint will be applied to a string or to all strings. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the string. You can set this parameter to one of the following: |
|||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||
|
Specifies the character position in the string for which to set the constraint.
A constraint can be set for any position, even a position greater than the maximum number of characters in the string. Constraints set at a position greater than the minimum number of characters in the string are ignored (when the string read does not contain a character at that position).
This parameter should be set to one of the following values:
For specifying the character position
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Sets the default constraint of the string model. The default constraint of the string model is used when no specific constraint is set to a given position. (summarize)Sets the default constraint of the string model. (more details...) |
||||||||||||||||||||||||||||||||||||||
0 <= Value <= 255 |
Sets the character position in the string to which to apply the constraint. |
Specifies the type of constraint to set.
By default, all constraints apply to any font in the context. For example, M_LETTER + M_DIGIT means any letter and any digit of any font is acceptable. To restrict the constraint to a specific font, see the combination value below.
For specifying the constraint
|
|||||||||||||||||||||||||||||||||||||||
Value | Description | ||||||||||||||||||||||||||||||||||||||
M_DEFAULT |
Sets the constraint to the default constraint. For a specific character position (the CharPos parameter is set to an individual value), the default is the same as the default constraint of the string model. For the default character position (the CharPos parameter is set to M_DEFAULT), the default is the same as M_ANY. (summarize)Sets the constraint to the default constraint. (more details...) |
||||||||||||||||||||||||||||||||||||||
M_ANY + |
Sets the constraint to any character. |
||||||||||||||||||||||||||||||||||||||
M_DIGIT + |
Sets the constraint to any digit (0 to 9). |
||||||||||||||||||||||||||||||||||||||
M_DIGIT + M_LETTER + |
Sets the constraint to any digit (0 to 9) and any letter (a to z and A to Z). |
||||||||||||||||||||||||||||||||||||||
M_LETTER + |
Sets the constraint to any letter (a to z and A to Z). Note that M_LETTER does not differentiate between upper and lower cases. (summarize)Sets the constraint to any letter (a to z and A to Z). (more details...) |
You can add one of the following values to the above-mentioned values to set the letter case of the constraint.
For specifying the letter case of the
constraint
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description | ||||||||||||||||||||||||||||||||||||||
M_LOWERCASE |
Sets the constraint to any lowercase letter (a to z). |
||||||||||||||||||||||||||||||||||||||
M_UPPERCASE |
Sets the constraint to any uppercase letter (A to Z). |
You can add the following value to the above-mentioned values to set the constraint to a specific font.
For restricting the constraint
|
|||||||||||||||||||||||||||||||||||||||
Combination value | Description | ||||||||||||||||||||||||||||||||||||||
Specifies that the constraint will be restricted to a specific font. Note that this value is only available for a font-based context. (summarize)Specifies that the constraint will be restricted to a specific font. (more details...) |
|||||||||||||||||||||||||||||||||||||||
Parameters | |||||||||||||||||||||||||||||||||||||||
This parameter specifies the index of the font. You can set this parameter to one of the following: |
|||||||||||||||||||||||||||||||||||||||
|
Specifies an explicit list of valid characters, at the specified position. This is an optional, null-terminated string.
All the specified characters must be compatible with the ConstraintType parameter definition. Each character in the character list must be unique; no character repetition is allowed in the CharListPtr parameter.
The string array must be of the right type for the encoding scheme selected (MstrInquire() with M_ENCODING).
Set this parameter to M_NULL if you are not specifying an explicit list.
Header | Include mil.h. |
Library | Use mil.lib; milstr.lib. |
DLL | Requires mil.dll; milstr.dll. |