Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    Utilities Class

    Namespace: Stride
    Assembly: Stride.Core.Assets.dll
    System.Object → Utilities
    Derived from Utilities:

    public static class Utilities
    Name Description
    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.

    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.

    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

    BuildValidNamespaceName(String, Char)

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

    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.

    BuildValidProjectName(String, Char)

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

    | Improve this Doc View Source

    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
    Type Name Description
    System.String originalName

    The original name

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.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
    Type Name Description
    System.String originalName

    The original name

    System.Collections.Generic.IEnumerable<System.String> additionalReservedWords

    Reserved words that must be escaped if used directly

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.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
    Type Name Description
    System.String originalName

    The original name

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.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
    Type Name Description
    System.String originalName

    The original name

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.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
    Type Name Description
    System.String originalName

    The original name

    System.Collections.Generic.IEnumerable<System.String> additionalReservedWords

    Reserved words that must be escaped if used directly

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.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
    Type Name Description
    System.String originalName

    The original name

    System.Char replacementCharacter

    The replacement character

    Returns
    Type Description
    System.String

    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation