os/security/securityanddataprivacytools/securitytools/certapp/utils/stringconv.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/securityanddataprivacytools/securitytools/certapp/utils/stringconv.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,38 @@
     1.4 +#ifndef __STRINGCONV_H__
     1.5 +#define __STRINGCONV_H__/*
     1.6 +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* under the terms of the License "Eclipse Public License v1.0"
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: 
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#include <string>
    1.24 +#include <e32base.h>
    1.25 +
    1.26 +/**
    1.27 + * @file
    1.28 + * @internalComponent
    1.29 + */
    1.30 +
    1.31 +// Converts the utf16 input into a new buffer and returns that buffer
    1.32 +TUint8 *cstrFromUtf16(const TText *aUtf16, TInt aLength, TInt &outLen); // length is in chars not bytes
    1.33 +std::string stringFromUtf16(const TText *aUtf16, TInt aLength); // length is in chars not bytes
    1.34 +std::string stringFromUtf16(const TDesC &aUtf16);
    1.35 +
    1.36 +// Converts the utf8 input into a new buffer and returns that buffer
    1.37 +// The new buffer will be NUL terminated, but the NUL is not included in the outputWords length
    1.38 +TText *utf16FromUtf8(const TUint8 *aUtf8, TInt aLength, TInt &outputWords);
    1.39 +
    1.40 +
    1.41 +#endif