From e2b3edec45fe1bfd76493acc366df971e89e7ae2 Mon Sep 17 00:00:00 2001
From: Xian Shi <40013335+R1ckShi@users.noreply.github.com>
Date: 星期四, 10 八月 2023 17:30:34 +0800
Subject: [PATCH] Merge pull request #830 from alibaba-damo-academy/dev_ts
---
funasr/runtime/onnxruntime/src/util.cpp | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/funasr/runtime/onnxruntime/src/util.cpp b/funasr/runtime/onnxruntime/src/util.cpp
index d29c5c0..755913c 100644
--- a/funasr/runtime/onnxruntime/src/util.cpp
+++ b/funasr/runtime/onnxruntime/src/util.cpp
@@ -180,4 +180,13 @@
}
}
+bool is_target_file(const std::string& filename, const std::string target) {
+ std::size_t pos = filename.find_last_of(".");
+ if (pos == std::string::npos) {
+ return false;
+ }
+ std::string extension = filename.substr(pos + 1);
+ return (extension == target);
+}
+
} // namespace funasr
\ No newline at end of file
--
Gitblit v1.9.1