From 49b25e755b70ec412feaaf0b898d6f7e09d2bea6 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 28 Jun 2022 09:40:37 +0800 Subject: +node example --- .../Assets/UNEB/Utility/StringExtensions.cs | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs (limited to 'Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs') diff --git a/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs new file mode 100644 index 00000000..33c0d960 --- /dev/null +++ b/Other/NodeEditorExamples/Assets/UNEB/Utility/StringExtensions.cs @@ -0,0 +1,29 @@ + +namespace UNEB +{ + public static class StringExtensions + { + + /// + /// Merges the parent and child paths with the '/' character. + /// + /// + /// + /// + public static string Dir(this string parentDir, string childDir) + { + return parentDir + '/' + childDir; + } + + /// + /// Appends the extension to the file name with '.' + /// + /// + /// + /// + public static string Ext(this string file, string extension) + { + return file + '.' + extension; + } + } +} \ No newline at end of file -- cgit v1.1-26-g67d0