Skip to content

Commit f7e0c3c

Browse files
committed
Added "Substr" method to the "String" object.
1 parent 1acfe8c commit f7e0c3c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CSharpToJavaScript/APIs/JS/Ecma/String.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public partial class String : StringPrototype
1616
public static implicit operator string(String value) { return new String(value) { Value = value }; }
1717

1818
[To(ToAttribute.FirstCharToLowerCase)]
19-
public StringPrototype Prototype { get; } = new();
19+
public static StringPrototype Prototype { get; } = new();
2020

2121
[To(ToAttribute.FirstCharToLowerCase)]
2222
public int Length { get; } = 0;
@@ -176,4 +176,10 @@ public string TrimStart()
176176
{
177177
throw new System.NotImplementedException();
178178
}
179+
180+
//https://262.ecma-international.org/5.1/index.html#sec-B.2.3
181+
public string Substr(int start, int length)
182+
{
183+
throw new System.NotImplementedException();
184+
}
179185
}

0 commit comments

Comments
 (0)