MCPcopy Create free account
hub / github.com/beefytech/Beef / ToCleanAttributeString

Method ToCleanAttributeString

IDEHelper/Compiler/BfAst.cpp:1263–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1261}
1262
1263String BfTypeReference::ToCleanAttributeString()
1264{
1265 // ToString might return something like "System.InlineAttribute", which we want to clean before we test for "Inline"
1266 auto typeRefName = ToString();
1267 if (typeRefName.EndsWith("Attribute"))
1268 {
1269 int attribNameStart = (int)typeRefName.LastIndexOf('.');
1270 if (attribNameStart != -1)
1271 typeRefName.Remove(0, attribNameStart + 1);
1272
1273 if (typeRefName.EndsWith("Attribute"))
1274 typeRefName.RemoveFromEnd(9);
1275 }
1276
1277 return typeRefName;
1278}
1279
1280//////////////////////////////////////////////////////////////////////////
1281

Callers 6

GetCustomAttributesMethod · 0.80
CreateMethodDefMethod · 0.80
ParseAttributesMethod · 0.80
FinishTypeDefMethod · 0.80

Calls 5

ToStringFunction · 0.70
EndsWithMethod · 0.45
LastIndexOfMethod · 0.45
RemoveMethod · 0.45
RemoveFromEndMethod · 0.45

Tested by

no test coverage detected