Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Drop unused functions: xbt_str_varsubst(), xbt_strbuff_varsubst()
[simgrid.git] / src / xbt / xbt_str.cpp
index 90eb701..68ee360 100644 (file)
@@ -141,31 +141,6 @@ void xbt_str_subst(char *str, char from, char to, int occurence)
   }
 }
 
-/** @brief Replaces a set of variables by their values
- *
- * @param str The input of the replacement process
- * @param patterns The changes to apply
- * @return The string modified
- *
- * Both '$toto' and '${toto}' are valid (and the two writing are equivalent).
- *
- * If the variable name contains spaces, use the brace version (ie, ${toto tutu})
- *
- * You can provide a default value to use if the variable is not set in the dict by using '${var:=default}' or
- * '${var:-default}'. These two forms are equivalent, even if they shouldn't to respect the shell standard (:= form
- * should set the value in the dict, but does not) (BUG).
- */
-char *xbt_str_varsubst(const char *str, xbt_dict_t patterns)
-{
-  xbt_strbuff_t buff = xbt_strbuff_new_from(str);
-  char *res;
-  xbt_strbuff_varsubst(buff, patterns);
-  res = buff->data;
-  xbt_strbuff_free_container(buff);
-  return res;
-}
-
-
 /** @brief Splits a string into a dynar of strings
  *
  * @param s: the string to split