Class StringExtensions
Set of utility functions with String
Inherited Members
Namespace: UnityEditor.Rendering
Syntax
public static class StringExtensions
Methods
HasExtension(String, String)
Checks if the given string ends with the given extension
Declaration
public static bool HasExtension(this string input, string extension)
Parameters
| Type | Name | Description |
|---|---|---|
| String | input | The input string |
| String | extension | The extension |
Returns
| Type | Description |
|---|---|
| Boolean | True if the extension is found on the string path |
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 |