MCPcopy Create free account
hub / github.com/apache/fory / Sanitize

Method Sanitize

csharp/src/Fory.Generator/ForyModelGenerator.cs:4199–4208  ·  view source on GitHub ↗
(string name)

Source from the content-addressed store, hash-verified

4197 }
4198
4199 private static string Sanitize(string name)
4200 {
4201 StringBuilder sb = new(name.Length + 8);
4202 foreach (char c in name)
4203 {
4204 sb.Append(char.IsLetterOrDigit(c) ? c : '_');
4205 }
4206
4207 return sb.ToString();
4208 }
4209
4210 private sealed class TypeResolution
4211 {

Callers

nothing calls this directly

Calls 2

AppendMethod · 0.80
ToStringMethod · 0.45

Tested by

no test coverage detected