Class StringExtensions
Set of utility functions with string
Inherited Members
Namespace: UnityEditor.Rendering
Assembly: Unity.RenderPipelines.Core.Editor.dll
Syntax
public static class StringExtensions
Methods
ContainsAny(string, params string[])
Checks if a string contains any of the strings given in strings to check and early out if it does
Declaration
public static bool ContainsAny(this string input, params string[] stringsToCheck)
Parameters
Type | Name | Description |
---|---|---|
string | input | The input string |
string[] | stringsToCheck | List of strings to check |
Returns
Type | Description |
---|---|
bool | True if a string contains any of the strings given in strings |
ReplaceInvalidFileNameCharacters(string, string)
Replaces invalid characters for a filename or a directory with a given optional replacemenet string
Declaration
public static string ReplaceInvalidFileNameCharacters(this string input, string replacement = "_")
Parameters
Type | Name | Description |
---|---|---|
string | input | The input filename or directory |
string | replacement | The replacement |
Returns
Type | Description |
---|---|
string | The string with the invalid characters replaced |