string_utils.I 809 B

1234567891011121314151617181920212223242526
  1. // Filename: string_utils.I
  2. // Created by: drose (14Jul00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. //
  6. // PANDA 3D SOFTWARE
  7. // Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved
  8. //
  9. // All use of this software is subject to the terms of the Panda 3d
  10. // Software license. You should have received a copy of this license
  11. // along with this source code; you will also find a current copy of
  12. // the license at http://etc.cmu.edu/panda3d/docs/license/ .
  13. //
  14. // To contact the maintainers of this program write to
  15. // [email protected] .
  16. //
  17. ////////////////////////////////////////////////////////////////////
  18. template<class Thing>
  19. INLINE string
  20. format_string(const Thing &thing) {
  21. ostringstream str;
  22. str << thing;
  23. return str.str();
  24. }