-vector<string> VectorizeString(string const &haystack, char const &split) __attrib_const;
-void ioprintf(ostream &out,const char *format,...) __like_printf(2);
-void strprintf(string &out,const char *format,...) __like_printf(2);
-char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3);
-bool CheckDomainList(const string &Host, const string &List);
-int tolower_ascii(int const c) __attrib_const __hot;
-string StripEpoch(const string &VerStr);
+
+// split a given string by a char
+std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) APT_CONST;
+
+/* \brief Return a vector of strings from string "input" where "sep"
+ * is used as the delimiter string.
+ *
+ * \param input The input string.
+ *
+ * \param sep The seperator to use.
+ *
+ * \param maxsplit (optional) The maximum amount of splitting that
+ * should be done .
+ *
+ * The optional "maxsplit" argument can be used to limit the splitting,
+ * if used the string is only split on maxsplit places and the last
+ * item in the vector contains the remainder string.
+ */
+std::vector<std::string> StringSplit(std::string const &input,
+ std::string const &sep,
+ unsigned int maxsplit=std::numeric_limits<unsigned int>::max()) APT_CONST;
+
+void ioprintf(std::ostream &out,const char *format,...) APT_PRINTF(2);
+void strprintf(std::string &out,const char *format,...) APT_PRINTF(2);
+char *safe_snprintf(char *Buffer,char *End,const char *Format,...) APT_PRINTF(3);
+bool CheckDomainList(const std::string &Host, const std::string &List);
+int tolower_ascii(int const c) APT_CONST APT_HOT;
+std::string StripEpoch(const std::string &VerStr);