Keyword replacement
Module — 2 files
These files compile together (same module folder).
file_1.verse
# キーワード置換
ReplaceKeyword(Input : string, Keywords : [string]string, ?MinLength : int = 20) : string =
# 文字数がMinLength未満の場合はそのまま返す
if (Input.Length < MinLength):
return Input
var Result : string = Input
# キーワードが含まれている場合、置換
for (Keyword -> ShortForm : Keywords):
set Result = Result.ReplaceAll(Keyword, ShortForm)
return Result
Sign in to download module
Copy-paste each file above is always free.