We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8dc0a21 commit 61ac6e8Copy full SHA for 61ac6e8
1 file changed
src/PolylineAlgorithm/Polyline.cs
@@ -21,6 +21,20 @@ namespace PolylineAlgorithm;
21
public readonly struct Polyline : IEquatable<Polyline> {
22
private readonly ReadOnlyMemory<char> _value;
23
24
+ /// <summary>
25
+ /// Initializes a new instance of the <see cref="Polyline"/> struct with the specified character sequence.
26
+ /// </summary>
27
+ /// <param name="value">
28
+ /// A read-only span of characters representing an encoded polyline.
29
+ /// </param>
30
+ public Polyline(ReadOnlySpan<char> value) {
31
+ if (value.IsEmpty) {
32
+ _value = ReadOnlyMemory<char>.Empty;
33
+ } else {
34
+ _value = new ReadOnlyMemory<char>(value.ToArray());
35
+ }
36
37
+
38
/// <summary>
39
/// Initializes a new, empty instance of the <see cref="Polyline"/> struct.
40
/// </summary>
0 commit comments