X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/1ca34b76da924ef9743ce07316d18e69ba45374f..96250a9ef52cc71e36906813bd8d1f330801f27b:/src/xbt/xbt_str.cpp diff --git a/src/xbt/xbt_str.cpp b/src/xbt/xbt_str.cpp index b1f9a38cfb..8496a21281 100644 --- a/src/xbt/xbt_str.cpp +++ b/src/xbt/xbt_str.cpp @@ -227,7 +227,7 @@ xbt_dynar_t xbt_str_split(const char *s, const char *sep) /** * \brief This functions splits a string after using another string as separator - * For example A!!B!!C splitted after !! will return the dynar {A,B,C} + * For example A!!B!!C split after !! will return the dynar {A,B,C} * \return An array of dynars containing the string tokens */ xbt_dynar_t xbt_str_split_str(const char *s, const char *sep) @@ -251,7 +251,7 @@ xbt_dynar_t xbt_str_split_str(const char *s, const char *sep) while (!done) { char *to_push; int v = 0; - //get the start of the first occurence of the substring + // get the start of the first occurrence of the substring q = strstr(p, sep); //if substring was not found add the entire string if (nullptr == q) { @@ -461,25 +461,6 @@ char *xbt_str_join_array(const char *const *strs, const char *sep) return res; } -/** @brief creates a new string containing what can be read on a fd */ -char *xbt_str_from_file(FILE * file) -{ - xbt_strbuff_t buff = xbt_strbuff_new(); - char *res; - char bread[1024]; - memset(bread, 0, 1024); - - while (!feof(file)) { - int got = fread(bread, 1, 1023, file); - bread[got] = '\0'; - xbt_strbuff_append(buff, bread); - } - - res = buff->data; - xbt_strbuff_free_container(buff); - return res; -} - /** @brief Parse an integer out of a string, or raise an error * * The @a str is passed as argument to your @a error_msg, as follows: