* @code
* #include <stdio.h>
* #include <stdlib.h>
+ * #include <string.h>
* #include <utils_i18n.h>
* int main() {
- * const char *pattern = "[:Hyphen:]";
- * i18n_uchar *_pattern = NULL;
- * i18n_uset_h uset = NULL;
+ * const char *pattern_ascii = "[:Hyphen:]";
+ * i18n_uchar *pattern = NULL;
+ * i18n_uset_h set = NULL;
* i18n_error_code_e error_code;
*
- * _pattern = (i18n_uchar *)calloc(strlen(pattern) + 1, sizeof(i18n_uchar));
- * i18n_ustring_copy_ua(_pattern, pattern);
+ * pattern = (i18n_uchar *)calloc(strlen(pattern_ascii) + 1, sizeof(i18n_uchar));
+ * i18n_ustring_copy_ua(pattern, pattern_ascii);
*
- * error_code = i18n_uset_create_pattern_options(_pattern, 10, I18N_USET_IGNORE_SPACE, &uset);
- * if (error_code!= I18N_ERROR_NONE) {
+ * error_code = i18n_uset_create_pattern_options(pattern, strlen(pattern_ascii), I18N_USET_IGNORE_SPACE, &set);
+ * if (error_code != I18N_ERROR_NONE) {
* printf("Error i18n_uset_create_pattern: %d\n", error_code);
* return EXIT_FAILURE;
* }