MAK RTIspy API Documentation for HLA Evolved
Home
Modules
Namespaces
Classes
Files
Examples
Libraries
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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 Mon Mar 21 09:41:37 EDT 2016 from SVN revision 163228
Copyright © 2005-2015 VT MÄK Inc. All Rights Reserved (
www.mak.com
)