< Summary

Class:TMP_TextExtensions
Assembly:HUDUtils
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Utils/TMP_TextExtensions.cs
Covered lines:3
Uncovered lines:3
Coverable lines:6
Total lines:22
Line coverage:50% (3 of 6)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ReplaceUnsupportedCharacters(...)0%11.15037.5%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/Utils/TMP_TextExtensions.cs

#LineLine coverage
 1using TMPro;
 2
 3public static class TMP_TextExtensions
 4{
 5    public static string ReplaceUnsupportedCharacters(this TMP_Text text, string bodyText, char replacementChar)
 6    {
 387        bool isBodyFormatSupported = text.font.HasCharacters(bodyText, out uint[] missing, searchFallbacks: true, tryAdd
 8
 389        if (!isBodyFormatSupported)
 10        {
 011            if (missing != null && missing.Length > 0)
 12            {
 013                for (int i = 0; i < missing.Length; i++)
 14                {
 015                    bodyText = bodyText.Replace(((char)missing[i]), replacementChar);
 16                }
 17            }
 18        }
 19
 3820        return bodyText;
 21    }
 22}