Table of Contents

Class StringUtil

Namespace
Hi.Common
Assembly
HiGeom.dll

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 string

The input string to search in.

functionName string

The name of the function to find.

funcCall string

When this method returns, contains the extracted function call if found; otherwise, null.

beginSearchIndex int

The 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 string

The input string containing the function call.

functionName string

The 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

src object

src

changeLine bool

change line

includeNonPublic bool

include non-public properties

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.