65.9K
CodeProject is changing. Read more.
Home

ARSLib 1.0

starIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

1.00/5 (19 votes)

Aug 19, 2006

viewsIcon

27741

downloadIcon

152

ARSLib 1.0 is just a starting platform for building a Rich Utility Library

Introduction

The basic motivation of creating this Library is to build a Rich Utility Library that can solve day-to-day common coding problems. In this current version, only two classes are provided i.e. StringPlus and FilePlus

StringPlus

This StringXP class is used to provide all the string related activities/methods. In this current version StringPlus provides 24 Utility Functions.

// Converts the string format to upper case
public static String ToUpperCase(String value)

//Converts a paritcular character to upper case in the string
public static String ToUpperCase(String value, Char character)

// Converts paritcular characters to upper case in the string
public static String ToUpperCase(String value, Char[] characters)

// Converts the string format to upper case from a particular character position and has a specified length
public static String ToUpperCase(String value, int startIndex, int length)

// Converts the string format to lower case
public static String ToLowerCase(String value)

// Converts a paritcular character to lower case in the string
public static String ToLowerCase(String value, Char character)

// Converts paritcular characters to lower case in the string
public static String ToLowerCase(String value, Char[] characters)

// Converts the string format to lower case from a particular character position and has a specified length
public static String ToLowerCase(String value, int startIndex, int length)

// Converts the string format to sentence case
public static String ToSentenceCase(String value)

// Converts the string format to title case
public static String ToTitleCase(String value)

// Remove a paritcular character from the string
public static String Remove(String value, Char character)

// Remove paritcular characters from the string
public static String Remove(String value, Char[] character)

// Appends a new string at the end of the current string
public static String PostAppend(String value, String appendValue)

// Appends a new string at the end of the current string
public static String PreAppend(String value, String appendValue)

// Returns the number of occurrence of a particular character
public static int Occurrence(string value, char character)

// Returns the number of occurrence of a particular character        
public static int Occurrence(string value, char character, bool ignoreCase)

// Searches whether the searchValue string exists in the current value string
public static bool Contains(string value, string searchValue)

// Searches whether the character exists in the current value string
public static bool Contains(string value, char searchCharacter)

// Returns the string in reverse order
public static string Reverse(string value)

// Returns a string from the end of the value string according to the length provided as input
public static string Right(string value, int length)

// Returns a string from the beginning of the value string according to the length provided as input
public static string Left(string value, int length)

// Return the count of number of character satisfying the character type
public static int Count(string value, ARSLib.CharacterType charaterType)

FilePlus

This FilePlus class is used to provide all the file related activities/methods. In this current version FilePlus provides 07 Utility Functions.

// Check whether the file physically exists or not
public static bool IsFileExist(string filePath)

// Copy the file to the target location and returns the target file status 
public static bool CopyFile(string currentPath, string destinationPath, bool overwrite)

// Copy the file to multiple target locations
public static void CopyFile(string currentPath, string[] destinationPaths, bool overwrite)

// Delete a file form the physical loaction
public static bool DeleteFile(string filePath)

// Delete multiple files form the physical loaction
public static bool DeleteFile(string[] filePaths)

Community Help

If you have any kind of idea of improving this library, please do comment on it and let me know about other utility functions you want in this library. i will be updating this library on weekly basis.