From 1d6a39c92495803b653656d6d35f3db19696832c Mon Sep 17 00:00:00 2001 From: apio Date: Mon, 1 May 2023 20:05:10 +0200 Subject: [PATCH] libluna: Make String::split() inline --- libluna/include/luna/String.h | 6 +++++- libluna/src/String.cpp | 5 ----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/libluna/include/luna/String.h b/libluna/include/luna/String.h index e8abc98e..cb2cd328 100644 --- a/libluna/include/luna/String.h +++ b/libluna/include/luna/String.h @@ -26,7 +26,11 @@ class String Result substring(usize begin, usize size) const; - Result> split(StringView delim) const; + Result> split(StringView delim) const + { + return view().split(delim); + } + Result> split_once(char delim) const { return view().split_once(delim); diff --git a/libluna/src/String.cpp b/libluna/src/String.cpp index e8b5c6c2..921c428c 100644 --- a/libluna/src/String.cpp +++ b/libluna/src/String.cpp @@ -81,11 +81,6 @@ Result String::substring(usize begin, usize size) const return String { dup, size }; } -Result> String::split(StringView delim) const -{ - return view().split(delim); -} - void String::trim(StringView delim) { isize i = (isize)m_length;