secureswitools/swisistools/source/interpretsislib/stringutils.h
changeset 0 ba25891c3a9e
child 50 c6e8afe0ba85
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/secureswitools/swisistools/source/interpretsislib/stringutils.h	Thu Dec 17 08:51:10 2009 +0200
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*
+*/
+
+
+/**
+ @file STRINGUTILS.H
+ @internalComponent
+ @released
+*/
+#ifndef	STRINGUTILS_H
+#define	STRINGUTILS_H
+
+// System includes
+#include <istream>
+#include <list>
+#include <vector>
+#include <map>
+#include <string>
+
+// User includes
+#include "symbiantypes.h"
+
+// Constants
+const std::wstring KDirectorySeparator( L"\\" );
+
+class StringUtils
+	{
+public:
+	static int FirstInvalidDirSeparatorSize(std::wstring& aPath, std::wstring::size_type& aIndex);
+    static std::wstring FixPathDelimiters( const std::string& aString );
+    static std::string TrimWhiteSpace( const std::string& aString );
+    static bool CheckForMatch( const std::string& aSearchFor, std::string& aLine );
+    static std::string ToUpper( const std::string& aString );
+	static std::wstring ToUpper( const std::wstring& aString );
+	static std::string ToLower( const std::string& aString );
+    static bool IsLastCharacter( const std::wstring& aString, wchar_t aChar );
+    static bool StartsWithDrive( const std::wstring& aText );
+    static std::wstring MakePathFromSID( const std::wstring& aBasePath, TUint32 aSID );
+	static std::wstring BuildSisRegistryFileName( const int aIndex );
+	static std::wstring BuildControllerFileName( const int aIndex, const int aCtlIndex);
+    static std::wstring EnsureDirectoryTerminated( const std::wstring& aDir );
+	static bool WildcardCompare( const std::wstring& aWildCardFileName, const std::wstring& aFileName );
+	// File parsing methods
+	static std::wstring NameAndExt( const std::wstring& aFile );
+	static std::wstring DriveAndPath( const std::wstring& aFile );
+	static std::wstring Path( const std::wstring& aFile );
+	static std::wstring Name( const std::wstring& aFile );
+	static std::wstring Ext( const std::wstring& aFile );
+    };
+
+
+#endif