• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neon-sunset / U8String / 6005208900

28 Aug 2023 09:36PM UTC coverage: 18.096% (-0.2%) from 18.326%
6005208900

push

github

neon-sunset
feat: Extend NativeU8String and restructure solution to account for increased line count, add roadmap draft

134 of 1050 branches covered (0.0%)

Branch coverage included in aggregate %.

1058 of 1058 new or added lines in 25 files covered. (100.0%)

478 of 2332 relevant lines covered (20.5%)

35305.41 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

3.45
/src/Implementations/Standard/U8String.Operators.cs
1
namespace U8Primitives;
2

3
public readonly partial struct U8String
4
{
5
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
6
    public static U8String operator +(U8String left, byte right)
7
    {
8
        if (!U8Info.IsAsciiByte(right))
×
9
        {
10
            ThrowHelpers.InvalidUtf8();
×
11
        }
12

13
        return U8Manipulation.ConcatUnchecked(left, right);
×
14
    }
15

16
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
17
    public static U8String operator +(U8String left, U8String right) => Concat(left, right);
×
18

19
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
20
    public static U8String operator +(U8String left, byte[] right) => Concat(left, right);
×
21

22
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
23
    public static U8String operator +(U8String left, Span<byte> right) => Concat(left, right);
×
24

25
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
26
    public static U8String operator +(U8String left, ReadOnlySpan<byte> right) => Concat(left, right);
×
27

28
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
29
    public static U8String operator +(byte[] left, U8String right) => Concat(left, right);
×
30

31
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
32
    public static U8String operator +(Span<byte> left, U8String right) => Concat(left, right);
×
33

34
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
35
    public static U8String operator +(ReadOnlySpan<byte> left, U8String right) => Concat(left, right);
×
36

37
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
38
    public static bool operator ==(U8String left, U8String right) => left.Equals(right);
×
39

40
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
41
    public static bool operator ==(U8String left, byte[] right) => left.Equals(right);
×
42

43
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
44
    public static bool operator ==(U8String left, Span<byte> right) => left.Equals(right);
×
45

46
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
47
    public static bool operator ==(U8String left, ReadOnlySpan<byte> right) => left.Equals(right);
×
48

49
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
50
    public static bool operator ==(byte[] left, U8String right) => right.Equals(left);
×
51

52
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
53
    public static bool operator ==(Span<byte> left, U8String right) => right.Equals(left);
×
54

55
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
56
    public static bool operator ==(ReadOnlySpan<byte> left, U8String right) => right.Equals(left);
×
57

58
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
59
    public static bool operator !=(U8String left, U8String right) => !(left == right);
×
60

61
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
62
    public static bool operator !=(U8String left, byte[] right) => !(left == right);
×
63

64
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
65
    public static bool operator !=(U8String left, Span<byte> right) => !(left == right);
×
66

67
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
68
    public static bool operator !=(U8String left, ReadOnlySpan<byte> right) => !(left == right);
×
69

70
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
71
    public static bool operator !=(byte[] left, U8String right) => !(left == right);
×
72

73
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
74
    public static bool operator !=(Span<byte> left, U8String right) => !(left == right);
×
75

76
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
77
    public static bool operator !=(ReadOnlySpan<byte> left, U8String right) => !(left == right);
×
78

79
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
80
    public static explicit operator U8String(ReadOnlySpan<byte> value)
81
    {
82
        return new(value);
×
83
    }
84

85
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
86
    public static implicit operator ReadOnlySpan<byte>(U8String value)
87
    {
88
        return value.AsSpan();
2,044✔
89
    }
90

91
    [MethodImpl(MethodImplOptions.AggressiveInlining)]
92
    public static implicit operator ReadOnlyMemory<byte>(U8String value)
93
    {
94
        return value.AsMemory();
×
95
    }
96
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc