xref: /aoo41x/main/sal/qa/inc/stringhelper.hxx (revision 565d668c)
1*565d668cSAndrew Rist /**************************************************************
2*565d668cSAndrew Rist  *
3*565d668cSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*565d668cSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*565d668cSAndrew Rist  * distributed with this work for additional information
6*565d668cSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*565d668cSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*565d668cSAndrew Rist  * "License"); you may not use this file except in compliance
9*565d668cSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*565d668cSAndrew Rist  *
11*565d668cSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*565d668cSAndrew Rist  *
13*565d668cSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*565d668cSAndrew Rist  * software distributed under the License is distributed on an
15*565d668cSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*565d668cSAndrew Rist  * KIND, either express or implied.  See the License for the
17*565d668cSAndrew Rist  * specific language governing permissions and limitations
18*565d668cSAndrew Rist  * under the License.
19*565d668cSAndrew Rist  *
20*565d668cSAndrew Rist  *************************************************************/
21*565d668cSAndrew Rist 
22cdf0e10cSrcweir #ifndef STRINGHELPER_HXX
23cdf0e10cSrcweir #define STRINGHELPER_HXX
24cdf0e10cSrcweir 
25cdf0e10cSrcweir #include <rtl/ustring.hxx>
26cdf0e10cSrcweir #include <rtl/string.hxx>
27cdf0e10cSrcweir 
operator <<=(rtl::OString & _rAsciiString,rtl::OUString const & _rUnicodeString)28cdf0e10cSrcweir inline void operator <<= (rtl::OString& _rAsciiString, rtl::OUString const & _rUnicodeString)
29cdf0e10cSrcweir {
30cdf0e10cSrcweir 	_rAsciiString = rtl::OUStringToOString(_rUnicodeString,RTL_TEXTENCODING_ASCII_US);
31cdf0e10cSrcweir }
operator <<=(rtl::OUString & _rUnicodeString,rtl::OString const & _rAsciiString)32cdf0e10cSrcweir inline void operator <<= (rtl::OUString& _rUnicodeString, rtl::OString const & _rAsciiString )
33cdf0e10cSrcweir {
34cdf0e10cSrcweir 	_rUnicodeString = rtl::OStringToOUString(_rAsciiString, RTL_TEXTENCODING_ASCII_US);
35cdf0e10cSrcweir }
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #endif
38