Commit 99171d83 authored by Jan Koester's avatar Jan Koester
Browse files

add new operator htmlstring

parent 1c67072b
Loading
Loading
Loading
Loading
+8 −0
Changes for src/html.cpp: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -120,6 +120,14 @@ libhtmlpp::HtmlString &libhtmlpp::HtmlString::operator<<(int src){
    return *this;
}

libhtmlpp::HtmlString &libhtmlpp::HtmlString::operator<<(unsigned int src){
    char *buf=new char[sizeof(int)+1];
    sys::ultoa(src,buf);
    assign(buf);
    delete[] buf;
    return *this;
}

libhtmlpp::HtmlString &libhtmlpp::HtmlString::operator<<(unsigned long src){
    char *buf=new char[sizeof(int)+1];
    sys::ultoa(src,buf);
+1 −0
Changes for src/html.h: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -84,6 +84,7 @@ namespace libhtmlpp {
        
        HtmlString &operator<<(const char *src);
        HtmlString &operator<<(int src);
        HtmlString &operator<<(unsigned int src);
        HtmlString &operator<<(char src);
        HtmlString &operator<<(unsigned long src);