From 8dbfd1b0e3887c4d63e4f815555c393e9ba2d303 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Tue, 29 Dec 2020 09:23:50 -0800 Subject: [PATCH] Added String.Substring --- BeefLibs/corlib/src/String.bf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/BeefLibs/corlib/src/String.bf b/BeefLibs/corlib/src/String.bf index 70851248..5daa6750 100644 --- a/BeefLibs/corlib/src/String.bf +++ b/BeefLibs/corlib/src/String.bf @@ -716,6 +716,18 @@ namespace System return i; } + [NoDiscard] + public StringView Substring(int pos) + { + return .(this, pos); + } + + [NoDiscard] + public StringView Substring(int pos, int length) + { + return .(this, pos, length); + } + public void Append(StringView strView) { Append(strView.Ptr, strView.Length);