Open SCAP Library: STRINGS

Open SCAP Library

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

Data Structures | Macros | Functions
STRINGS
Common

Functions to access and manipulate textual data. More...

## Data Structures
struct | oscap_text
| Representation of internationalizable character strings. More...
struct | oscap_stringlist
| A collection of strings. More...
struct | oscap_text_iterator
| Internationalized string iterator. More...
struct | oscap_string_iterator
| String iterator. More...
struct | oscap_stringlist_iterator
| Iterator over collections of strings. More...

## Functions
struct oscap_text * | oscap_text::oscap_text_new (void)
| Create an internationalized text field. More...
struct oscap_text * | oscap_text::oscap_text_clone (const struct oscap_text *text)
| Clone an internationalized text field. More...
struct oscap_text * | oscap_text::oscap_text_new_html (void)
| Create an internationalized text field with HTML content. More...
void | oscap_text::oscap_text_free (struct oscap_text *)
| Release an internationalized text field.

## Common language codes
const char *const | OSCAP_LANG_ENGLISH
| English.
const char *const | OSCAP_LANG_ENGLISH_US
| American English.
const char *const | OSCAP_LANG_DEFAULT
| Default language (i.e. American English)

## Getters
Return value is pointer to structure's member. Do not free unless you null the pointer in the structure. Use remove function otherwise.
struct oscap_string_iterator * | oscap_stringlist::oscap_stringlist_get_strings (const struct oscap_stringlist *list)
struct oscap_stringlist * | oscap_stringlist::oscap_stringlist_clone (struct oscap_stringlist *list)
const char * | oscap_text::oscap_text_get_text (const struct oscap_text *text)
const char * | oscap_text::oscap_text_get_lang (const struct oscap_text *text)
char * | oscap_text::oscap_text_get_plaintext (const struct oscap_text *text)
| Get plaintext representation of the text. More...
bool | oscap_text::oscap_text_get_is_html (const struct oscap_text *text)
| Does this text posses a HTML content?
bool | oscap_text::oscap_text_get_can_substitute (const struct oscap_text *text)
| Can this text contain substitutions?
bool | oscap_text::oscap_text_get_can_override (const struct oscap_text *text)
| Can this text override parent content?
bool | oscap_text::oscap_text_get_overrides (const struct oscap_text *text)
| Does this text override parent content?

## Setters
For lists use add functions. Parameters of set functions are duplicated in memory and need to be freed by caller.
bool | oscap_text::oscap_text_set_overrides (struct oscap_text *text, bool overrides)
| Set whether this text overrides parent content.
bool | oscap_text::oscap_text_set_text (struct oscap_text *text, const char *string)
bool | oscap_text::oscap_text_set_lang (struct oscap_text *text, const char *string)
bool | oscap_stringlist::oscap_stringlist_add_string (struct oscap_stringlist *list, const char *str)
struct oscap_stringlist * | oscap_stringlist::oscap_stringlist_new (void)
void | oscap_stringlist::oscap_stringlist_free (struct oscap_stringlist *list)

## Iterators
struct oscap_text * | oscap_text_iterator::oscap_text_iterator_next (struct oscap_text_iterator *it)
bool | oscap_text_iterator::oscap_text_iterator_has_more (struct oscap_text_iterator *it)
void | oscap_text_iterator::oscap_text_iterator_free (struct oscap_text_iterator *it)
void | oscap_text_iterator::oscap_text_iterator_remove (struct oscap_text_iterator *it)
void | oscap_text_iterator::oscap_text_iterator_reset (struct oscap_text_iterator *it)
const char * | oscap_string_iterator::oscap_string_iterator_next (struct oscap_string_iterator *it)
bool | oscap_string_iterator::oscap_string_iterator_has_more (struct oscap_string_iterator *it)
void | oscap_string_iterator::oscap_string_iterator_free (struct oscap_string_iterator *it)
void | oscap_string_iterator::oscap_string_iterator_remove (struct oscap_string_iterator *it)
void | oscap_string_iterator::oscap_string_iterator_reset (struct oscap_string_iterator *it)
struct oscap_stringlist * | oscap_stringlist_iterator::oscap_stringlist_iterator_next (struct oscap_stringlist_iterator *it)
bool | oscap_stringlist_iterator::oscap_stringlist_iterator_has_more (struct oscap_stringlist_iterator *it)
void | oscap_stringlist_iterator::oscap_stringlist_iterator_free (struct oscap_stringlist_iterator *it)
void | oscap_stringlist_iterator::oscap_stringlist_iterator_remove (struct oscap_stringlist_iterator *it)
void | oscap_stringlist_iterator::oscap_stringlist_iterator_reset (struct oscap_stringlist_iterator *it)

## Detailed Description

Functions to access and manipulate textual data.

## Function Documentation

void oscap_string_iterator_free | ( | struct oscap_string_iterator * | it | ) |

bool oscap_string_iterator_has_more | ( | struct oscap_string_iterator * | it | ) |

const char * oscap_string_iterator_next | ( | struct oscap_string_iterator * | it | ) |

void oscap_string_iterator_remove | ( | struct oscap_string_iterator * | it | ) |

void oscap_string_iterator_reset | ( | struct oscap_string_iterator * | it | ) |

bool oscap_stringlist_add_string | ( | struct oscap_stringlist * | list,
|  | const char * | str
| ) |  |

struct oscap_stringlist * oscap_stringlist_clone | ( | struct oscap_stringlist * | list | ) |

void oscap_stringlist_free | ( | struct oscap_stringlist * | list | ) |

struct oscap_string_iterator * oscap_stringlist_get_strings | ( | const struct oscap_stringlist * | list | ) |

void oscap_stringlist_iterator_free | ( | struct oscap_stringlist_iterator * | it | ) |

bool oscap_stringlist_iterator_has_more | ( | struct oscap_stringlist_iterator * | it | ) |

struct oscap_stringlist * oscap_stringlist_iterator_next | ( | struct oscap_stringlist_iterator * | it | ) |

void oscap_stringlist_iterator_remove | ( | struct oscap_stringlist_iterator * | it | ) |

void oscap_stringlist_iterator_reset | ( | struct oscap_stringlist_iterator * | it | ) |

struct oscap_stringlist * oscap_stringlist_new | ( | void |  | ) |

struct oscap_text * oscap_text_clone | ( | const struct oscap_text * | text | ) |

Clone an internationalized text field.

Parameters

  text | oscap_text structure to clone

const char * oscap_text_get_lang | ( | const struct oscap_text * | text | ) |

char * oscap_text_get_plaintext | ( | const struct oscap_text * | text | ) |

Get plaintext representation of the text.

Caller is responsible for freeing returned string.

const char * oscap_text_get_text | ( | const struct oscap_text * | text | ) |

void oscap_text_iterator_free | ( | struct oscap_text_iterator * | it | ) |

bool oscap_text_iterator_has_more | ( | struct oscap_text_iterator * | it | ) |

struct oscap_text * oscap_text_iterator_next | ( | struct oscap_text_iterator * | it | ) |

void oscap_text_iterator_remove | ( | struct oscap_text_iterator * | it | ) |

void oscap_text_iterator_reset | ( | struct oscap_text_iterator * | it | ) |

struct oscap_text * oscap_text_new | ( | void |  | ) |

Create an internationalized text field.

Parameters

  lang | - language identifier (

See also
  oscap_text_lang)

Parameters

  encoding | - language encoding (

See also
  oscap_text_encoding)

struct oscap_text * oscap_text_new_html | ( | void |  | ) |

Create an internationalized text field with HTML content.

Parameters

  lang | - language identifier (

See also
  oscap_text_lang)

Parameters

  encoding | - language encoding (

See also
  oscap_text_encoding)

bool oscap_text_set_lang | ( | struct oscap_text * | text,
|  | const char * | string
| ) |  |

bool oscap_text_set_text | ( | struct oscap_text * | text,
|  | const char * | string
| ) |  |