Loading...
Searching...
No Matches
String node
Grammar nodes

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

Collaboration diagram for String node:

## Functions

struct ec_node * | ec_node_str (const char *id, const char *str)
| Create a string node that matches a specific string.
int | ec_node_str_set_str (struct ec_node *node, const char *str)
| Set the string to match on a string node.

## 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

  id | The node identifier.
  str | The 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

  node | The string node.
  str | The string to match. It is duplicated internally.

Returns
  0 on success, -1 on error (errno is set).