securityanddataprivacytools/securitytools/certapp/utils/stringconv.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 #ifndef __STRINGCONV_H__
       
     2 #define __STRINGCONV_H__/*
       
     3 * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     4 * All rights reserved.
       
     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".
       
     9 *
       
    10 * Initial Contributors:
       
    11 * Nokia Corporation - initial contribution.
       
    12 *
       
    13 * Contributors:
       
    14 *
       
    15 * Description: 
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include <string>
       
    21 #include <e32base.h>
       
    22 
       
    23 /**
       
    24  * @file
       
    25  * @internalComponent
       
    26  */
       
    27 
       
    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);
       
    32 
       
    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);
       
    36 
       
    37 
       
    38 #endif