Move HLSL extensions to new shared project
このコミットが含まれているのは:
1 親
33235d68c8
コミット
31cfdd9eca
22ファイル変更
+44
-238
検索条件に一致するファイルはありません
@@ -0,0 +1,17 @@
|
||||
namespace ComputeSharp.SourceGeneration.Extensions;
|
||||
|
||||
/// <summary>
|
||||
/// Extension methods for <see cref="string"/> types.
|
||||
/// </summary>
|
||||
internal static class StringExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts a given <see cref="string"/> instance to a valid HLSL identifier name.
|
||||
/// </summary>
|
||||
/// <param name="text">The input <see cref="string"/> instance to convert.</param>
|
||||
/// <returns>An valid HLSL identifier name from <paramref name="text"/>.</returns>
|
||||
public static string ToHlslIdentifierName(this string text)
|
||||
{
|
||||
return text.Replace('.', '_').Replace('+', '_');
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする