65.9K
CodeProject 正在变化。 阅读更多。
Home

ARSLib 1.0

starIconemptyStarIconemptyStarIconemptyStarIconemptyStarIcon

1.00/5 (19投票s)

2006年8月19日

viewsIcon

28142

downloadIcon

152

ARSLib 1.0 只是构建一个丰富的实用程序库的起点。

引言

创建此库的基本动机是构建一个能够解决日常常见编码问题的丰富实用程序库。 在当前版本中,仅提供两个类,即 StringPlus 和 FilePlus。

StringPlus

这个 StringXP 类用于提供所有字符串相关的活动/方法。 在当前版本中,StringPlus 提供 24 个实用函数。
// 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

这个 FilePlus 类用于提供所有文件相关的活动/方法。 在当前版本中,FilePlus 提供 07 个实用函数。
// 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)

社区帮助

如果您对改进此库有任何想法,请发表评论并告诉我您希望在此库中添加的其他实用函数。 我将每周更新此库。

© . All rights reserved.