MAK RTIspy API Documentation for HLA 1516
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
examples
rtisimple
rtiSimpleStringUtil.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2010 MaK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
6
#ifndef stringUtil_H_
7
#define stringUtil_H_
8
9
#include <string>
10
#include <sstream>
11
12
// Convert narrow C string to wide string
13
inline
std::wstring
DtToWString
(
const
char
* in_val)
14
{
15
std::wstring temp;
16
while
(*in_val !=
'\0'
)
17
temp += *in_val++;
18
return
temp;
19
}
20
21
// Convert narrow string to wide string
22
inline
std::string
DtToString
(
const
std::wstring &in_val)
23
{
24
std::string temp;
25
std::wstring::const_iterator b = in_val.begin();
26
const
std::wstring::const_iterator e = in_val.end();
27
while
(b != e)
28
{
29
temp +=
static_cast<
char
>
(*b);
30
++b;
31
}
32
return
temp;
33
}
34
35
#endif
36
Document ID: Generated on Tue May 7 16:26:47 EDT 2013 from SVN revision 126903
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)