Search Results for

    Show / Hide Table of Contents

    Class StringUtils

    String utilities class.

    Inheritance
    System.Object
    StringUtils
    Namespace: FlaxEngine
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public static class StringUtils : Object

    Methods

    CombinePaths(String, String)

    Combines the paths.

    Declaration
    public static string CombinePaths(string left, string right)
    Parameters
    System.String left

    The left.

    System.String right

    The right.

    Returns
    System.String

    The combined path

    CombinePaths(String, String, String)

    Combines the paths.

    Declaration
    public static string CombinePaths(string left, string middle, string right)
    Parameters
    System.String left

    The left.

    System.String middle

    The middle.

    System.String right

    The right.

    Returns
    System.String

    The combined path

    ConvertRelativePathToAbsolute(String)

    Converts path relative to the engine startup folder into absolute path.

    Declaration
    public static string ConvertRelativePathToAbsolute(string path)
    Parameters
    System.String path

    Path relative to the engine directory.

    Returns
    System.String

    Absolute path

    ConvertRelativePathToAbsolute(String, String)

    Converts path relative to basePath into absolute path.

    Declaration
    public static string ConvertRelativePathToAbsolute(string basePath, string path)
    Parameters
    System.String basePath

    The base path.

    System.String path

    Path relative to basePath.

    Returns
    System.String

    Absolute path

    GetPathWithoutExtension(String)

    Removes extension from the file path.

    Declaration
    public static string GetPathWithoutExtension(string path)
    Parameters
    System.String path

    The path.

    Returns
    System.String

    Path without extension.

    HexDigit(Char)

    Parse hexadecimals digit to value.

    Declaration
    public static int HexDigit(char c)
    Parameters
    System.Char c

    The hex character.

    Returns
    System.Int32

    Value.

    IsHexDigit(Char)

    Checks if given character is valid hexadecimal digit.

    Declaration
    public static bool IsHexDigit(char c)
    Parameters
    System.Char c

    The hex character.

    Returns
    System.Boolean

    True if character is valid hexadecimal digit, otherwise false.

    IsRelative(String)

    Determines whether the specified path is relative or is absolute.

    Declaration
    public static bool IsRelative(string path)
    Parameters
    System.String path

    The input path.

    Returns
    System.Boolean

    true if the specified path is relative; otherwise, false if is relative.

    NormalizeExtension(String)

    Normalizes the file extension to common format: no leading dot and all lowercase. For example: '.TxT' will return 'txt'.

    Declaration
    public static string NormalizeExtension(string extension)
    Parameters
    System.String extension

    The extension.

    Returns
    System.String

    The normalized extension.

    NormalizePath(String)

    Normalizes the path to the standard Flax format (all separators are '/' except for drive 'C:').

    Declaration
    public static string NormalizePath(string path)
    Parameters
    System.String path

    The path.

    Returns
    System.String

    The normalized path.

    RemoveNewLine(String)

    Removes any new line characters (\r or \n) from the string.

    Declaration
    public static string RemoveNewLine(this string s)
    Parameters
    System.String s

    The string to process.

    Returns
    System.String

    The single-line string.

    RemovePathRelativeParts(String)

    Removes the relative parts from the path. For instance it replaces 'xx/yy/../zz' with 'xx/zz'.

    Declaration
    public static string RemovePathRelativeParts(string path)
    Parameters
    System.String path

    The input path.

    Returns
    System.String

    The output path.

    Reverse(String)

    Reverses the specified input string.

    Declaration
    public static string Reverse(this string s)
    Parameters
    System.String s

    The string to reverse.

    Returns
    System.String

    The reversed string.

    Remarks

    Correctly handles all UTF-16 strings

    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat