* Store a string and create an ident.
*
* Stores a string in the ident module and returns a handle for the string.
- * Copies the string.
+ *
+ * Copies the string. @p str must be zero terminated
+ *
+ * @param str - the string which shall be stored
+ *
+ * @return id - a handle for the generated ident
+ *
+ * @see id_to_str(), id_to_strlen()
+ */
+ident *new_id_from_str (const char *str);
+
+/**
+ * Store a string and create an ident.
+ *
+ * Stores a string in the ident module and returns a handle for the string.
+ *
+ * Copies the string. This version can take non-zero-terminated strings
*
* @param str - the string (or whatever) which shall be stored
* @param len - the length of the data in bytes
*
* @return id - a handle for the generated ident
*
- * @see id_to_str(), id_to_strlen()
+ * @see new_id_to_str(), id_to_strlen()
*/
INLINE ident *id_from_str (const char *str, int len);
*
* @return cp - a string
*
- * @see id_from_str(), id_to_strlen()
+ * @see new_id_to_str(), id_from_str(), id_to_strlen()
*/
INLINE const char *id_to_str (ident *id);
*
* @return len - the length of the string
*
- * @see id_from_str(), id_to_str()
+ * @see new_id_to_str(), id_from_str(), id_to_str()
*/
INLINE int id_to_strlen(ident *id);
* @param prefix - the prefix
* @param id - the ident
*
- * @see id_from_str(), id_to_str(), id_is_prefix()
+ * @see new_id_to_str(), id_from_str(), id_to_str(), id_is_prefix()
*/
int id_is_prefix (ident *prefix, ident *id);
* @param suffix - the suffix
* @param id - the ident
*
- * @see id_from_str(), id_to_str(), id_is_prefix()
+ * @see new_id_to_str(), id_from_str(), id_to_str(), id_is_prefix()
*/
int id_is_suffix (ident *suffix, ident *id);
+/**
+ * Return true if an ident contains a given character.
+ *
+ * @param id - the ident
+ * @param c - the character
+ *
+ * @see new_id_to_str(), id_from_str(), id_to_str()
+ */
+int id_contains_char (ident *id, char c);
+
/**
* Prints the ident to stdout.
*
* @return
* number of btes written
*
- * @see id_from_str(), id_to_str(), id_is_prefix(), fprint_id()
+ * @see new_id_to_str(), id_from_str(), id_to_str(), id_is_prefix(), fprint_id()
*/
int print_id (ident *id);
* @return
* number of btes written
*
- * @see id_from_str(), id_to_str(), id_is_prefix(), print_id()
+ * @see new_id_to_str(), id_from_str(), id_to_str(), id_is_prefix(), print_id()
*/
int fprint_id (FILE *F, ident *id);