Libecoli  0.11.3
Extensible COmmand LIne library
Functions
String node

A node that matches a specific string. More...

Functions

struct ec_nodeec_node_str (const char *id, const char *str)
 
int ec_node_str_set_str (struct ec_node *node, const char *str)
 

Detailed Description

A node that matches a specific string.

Configuration Schema

schema str {
string string {
description "The string to match.";
}
}

Function Documentation

◆ ec_node_str()

struct ec_node* ec_node_str ( const char *  id,
const char *  str 
)

Create a string node that matches a specific string.

Parameters
idThe node identifier.
strThe string to match.
Returns
The node, or NULL on error (errno is set).
Examples
extension-editline/main.c, pool-editline/main.c, readline/main.c, and simple-editline/main.c.

◆ ec_node_str_set_str()

int ec_node_str_set_str ( struct ec_node node,
const char *  str 
)

Set the string to match on a string node.

Parameters
nodeThe string node.
strThe string to match. It is duplicated internally.
Returns
0 on success, -1 on error (errno is set).