First public contribution.
1 #ifndef __STRINGCONV_H__
2 #define __STRINGCONV_H__/*
3 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
5 * This component and the accompanying materials are made available
6 * under the terms of the License "Eclipse Public License v1.0"
7 * which accompanies this distribution, and is available
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
10 * Initial Contributors:
11 * Nokia Corporation - initial contribution.
28 // Converts the utf16 input into a new buffer and returns that buffer
29 TUint8 *cstrFromUtf16(const TText *aUtf16, TInt aLength, TInt &outLen); // length is in chars not bytes
30 std::string stringFromUtf16(const TText *aUtf16, TInt aLength); // length is in chars not bytes
31 std::string stringFromUtf16(const TDesC &aUtf16);
33 // Converts the utf8 input into a new buffer and returns that buffer
34 // The new buffer will be NUL terminated, but the NUL is not included in the outputWords length
35 TText *utf16FromUtf8(const TUint8 *aUtf8, TInt aLength, TInt &outputWords);