]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.h
Convert most of the bibtex machinery to docstring.
[lyx.git] / src / support / lstrings.h
index b0016bf8469941be67ba757c8d267c41f2181bd1..87e7f242fd7691785e12966ba4f5ad98f444537b 100644 (file)
@@ -72,6 +72,9 @@ bool isHex(lyx::docstring const & str);
 
 int hexToInt(lyx::docstring const & str);
 
+/// is \p str pure ascii?
+bool isAscii(docstring const & str);
+
 ///
 char lowercase(char c);
 
@@ -86,9 +89,11 @@ char_type uppercase(char_type c);
 
 /// same as lowercase(), but ignores locale
 std::string const ascii_lowercase(std::string const &);
+docstring const ascii_lowercase(docstring const &);
 
 ///
 std::string const lowercase(std::string const &);
+docstring const lowercase(docstring const &);
 
 ///
 std::string const uppercase(std::string const &);
@@ -213,12 +218,15 @@ std::string const split(std::string const & a, char delim);
 /// Same as split but uses the last delim.
 std::string const rsplit(std::string const & a, std::string & piece, char delim);
 
-/// Escapes non ASCII chars
+/// Escapes non ASCII chars and other problematic characters that cause
+/// problems in latex labels.
 docstring const escape(docstring const & lab);
 
 /// gives a vector of stringparts which have the delimiter delim
 std::vector<std::string> const getVectorFromString(std::string const & str,
                                              std::string const & delim = std::string(","));
+std::vector<docstring> const getVectorFromString(docstring const & str,
+               docstring const & delim = from_ascii(","));
 
 // the same vice versa
 std::string const getStringFromVector(std::vector<std::string> const & vec,