yumapro  23.10T-7
YumaPro SDK
Loading...
Searching...
No Matches
YANG Identifiers

YANG Identifier validation functions. More...

Collaboration diagram for YANG Identifiers:

Functions

boolean ncx_valid_name_ch (uint32 ch)
 Check if the character is a valid YANG identifier chara. More...
 
boolean ncx_valid_fname_ch (uint32 ch)
 Check if an xmlChar is a valid NCX name string first char. More...
 
boolean ncx_valid_name (const xmlChar *str, uint32 len)
 Check if an xmlChar string is a valid YANG identifier value. More...
 
boolean ncx_valid_name2 (const xmlChar *str)
 Check if an xmlChar string is a valid NCX name. More...
 

Detailed Description

YANG Identifier validation functions.

This implementation limits identifiers to 64 chars. YANG does not allow an identifier to start with a number. It can only start with a letter or an underscore.

Function Documentation

◆ ncx_valid_fname_ch()

boolean ncx_valid_fname_ch ( uint32  ch)

Check if an xmlChar is a valid NCX name string first char.

Parameters
chxmlChar to check
Returns
TRUE if a valid first name char, FALSE otherwise
Here is the caller graph for this function:

◆ ncx_valid_name()

boolean ncx_valid_name ( const xmlChar *  str,
uint32  len 
)

Check if an xmlChar string is a valid YANG identifier value.

Parameters
strxmlChar string to check
lenlength of the string to check (in case of substr)
Returns
TRUE if a valid name string, FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_valid_name2()

boolean ncx_valid_name2 ( const xmlChar *  str)

Check if an xmlChar string is a valid NCX name.

Must be a zero-terminated C string

Parameters
strxmlChar string to check (zero-terminated)
Returns
TRUE if a valid name string, FALSE otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ncx_valid_name_ch()

boolean ncx_valid_name_ch ( uint32  ch)

Check if the character is a valid YANG identifier chara.

Parameters
chcharacter to check
Returns
TRUE if a valid YANG identifier char; FALSE otherwise
Here is the caller graph for this function: