From d746ae3ee95bb90c6cf209e45dfd719c56f03785 Mon Sep 17 00:00:00 2001 From: choykarl <253440030@qq.com> Date: Mon, 1 Jan 2024 22:22:46 +0800 Subject: [PATCH] use prefix func to get a substring --- Easydict/Feature/Service/Ali/AliService.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Easydict/Feature/Service/Ali/AliService.swift b/Easydict/Feature/Service/Ali/AliService.swift index 7e173b300..6ba555109 100644 --- a/Easydict/Feature/Service/Ali/AliService.swift +++ b/Easydict/Feature/Service/Ali/AliService.swift @@ -60,7 +60,7 @@ class AliService: QueryService { override func translate(_ text: String, from: Language, to: Language, completion: @escaping (EZQueryResult, Error?) -> Void) { let limit = 5000 - let text = text.count > limit ? String(text[..