Changeset 78:fa189c22a09e in rrlib_util


Ignore:
Timestamp:
04.02.2013 15:17:40 (7 years ago)
Author:
Jens Wettach <wettach@…>
Branch:
default
Children:
79:949d304fcb04, 82:bcdf2a9fd146
Parents:
77:57c756db0b8d (diff), 76:d0ab97f0f41d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

merged with changes from rrlib.org

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sStringUtils.h

    r73 r78  
    336336   */ 
    337337  template <class T> 
    338   static std::string StringOf(T object) 
     338  static std::string StringOf(const T& object) 
    339339  { 
    340340    std::ostringstream os; 
  • sStringUtils.h

    r77 r78  
    225225  static void Replace(char *input_str, char target_token, char replace_token); 
    226226 
     227  static std::string ConstReplace(const std::string &input_str, const char* target_token, const char* replace_token); 
     228 
    227229  /*! 
    228230   * Stream manipulator implementation for reading a string from actual position within the stream up to the end of line. 
     
    352354    s = os.str(); 
    353355  } 
     356  /*! 
     357   * \brief Converting a std::string representing a hexadecimal number into a decimal number 
     358   * \param string representing hexadecimal number 
     359   */ 
     360 
     361  template<class T> 
     362  static T HexStringToDecNumber(std::string str) 
     363  { 
     364    std::istringstream iss(str); 
     365    T result = 0; 
     366    iss >> std::hex >> result; 
     367    return result; 
     368  } 
     369 
    354370 
    355371  /*! 
Note: See TracChangeset for help on using the changeset viewer.