BindingsGenerator.Parameter.BasicType C# (CSharp) Метод

BasicType() публичный Метод

If type "const float3 &" -> BasicType() returns "float3". If type "const float3 &" -> BasicType() returns "float3". If type "float3 * const" -> BasicType() returns "float3*". If type "const float3 * const" -> BasicType() returns "const float3*".
public BasicType ( ) : string
Результат string
        public string BasicType()
        {
            string t = type.Trim();
            if (t.EndsWith("&"))
            {
                t = t.Substring(0, t.Length - 1).Trim();
                if (t.StartsWith("const"))
                    t = t.Substring(5).Trim();
            }
            if (t.EndsWith("const"))
                t = t.Substring(0, t.Length - 5).Trim();
            return t;
        }