Class StringUtil
Utility for managing text.
public static class StringUtil
- Inheritance
-
StringUtil
- Inherited Members
Methods
ExtractFullFunctionCall(string, string, out string, int)
Extracts a complete function call from a string, including the function name and all parameters.
public static int ExtractFullFunctionCall(string input, string functionName, out string funcCall, int beginSearchIndex = 0)
Parameters
input
stringThe input string to search in.
functionName
stringThe name of the function to find.
funcCall
stringWhen this method returns, contains the extracted function call if found; otherwise, null.
beginSearchIndex
intThe index in the input string to begin the search.
Returns
- int
The starting index of the function call if found; otherwise, -1.
ExtractFunctionArguments(string, string)
Extracts the arguments of a function call from a string.
public static string ExtractFunctionArguments(string input, string functionName)
Parameters
input
stringThe input string containing the function call.
functionName
stringThe name of the function whose arguments to extract.
Returns
- string
The arguments string if the function call is found; otherwise, null.
GetPropertyStringIfToStringNotOverloaded(object, bool, bool)
Create string by properties.
public static string GetPropertyStringIfToStringNotOverloaded(this object src, bool changeLine = false, bool includeNonPublic = false)
Parameters
Returns
- string
string
ToDotSplitedString(IEnumerable<object>)
Converts a collection of objects to a comma-separated string.
public static string ToDotSplitedString(this IEnumerable<object> objects)
Parameters
objects
IEnumerable<object>The collection of objects to convert.
Returns
- string
A comma-separated string representation of the objects.