namespace ComputeSharp.SourceGeneration.Extensions; /// /// Extension methods for types. /// internal static class StringExtensions { /// /// Converts a given instance to a valid HLSL identifier name. /// /// The input instance to convert. /// An valid HLSL identifier name from . public static string ToHlslIdentifierName(this string text) { return text.Replace('.', '_').Replace('+', '_'); } }