Table of Contents

Class Utilities

Namespace
Stride
Assembly
Stride.Core.Assets.dll
public static class Utilities
Inheritance
Utilities

Methods

BuildValidClassName(string, char)

Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character.

public static string BuildValidClassName(string originalName, char replacementCharacter = '_')

Parameters

originalName string

The original name

replacementCharacter char

The replacement character

Returns

string

BuildValidClassName(string, IEnumerable<string>, char)

Build a valid C# class name from the provided string. It replaces all the forbidden characters by the provided replacement character.

public static string BuildValidClassName(string originalName, IEnumerable<string> additionalReservedWords, char replacementCharacter = '_')

Parameters

originalName string

The original name

additionalReservedWords IEnumerable<string>

Reserved words that must be escaped if used directly

replacementCharacter char

The replacement character

Returns

string

BuildValidFileName(string, char)

Build a valid file name from the provided string. It replaces all the forbidden characters by the provided replacement character. For reference see: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

public static string BuildValidFileName(string originalName, char replacementCharacter = '_')

Parameters

originalName string

The original name

replacementCharacter char

The replacement character

Returns

string

BuildValidNamespaceName(string, char)

Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character.

public static string BuildValidNamespaceName(string originalName, char replacementCharacter = '_')

Parameters

originalName string

The original name

replacementCharacter char

The replacement character

Returns

string

BuildValidNamespaceName(string, IEnumerable<string>, char)

Build a valid C# namespace name from the provided string. It replaces all the forbidden characters by the provided replacement character.

public static string BuildValidNamespaceName(string originalName, IEnumerable<string> additionalReservedWords, char replacementCharacter = '_')

Parameters

originalName string

The original name

additionalReservedWords IEnumerable<string>

Reserved words that must be escaped if used directly

replacementCharacter char

The replacement character

Returns

string

BuildValidProjectName(string, char)

Build a valid C# project name from the provided string. It replaces all the forbidden characters by the provided replacement character.

public static string BuildValidProjectName(string originalName, char replacementCharacter = '_')

Parameters

originalName string

The original name

replacementCharacter char

The replacement character

Returns

string