What is Nostr?
/ ID-Hub
npub1nr0…nzyk
2023-05-04 01:38:55
in reply to nevent1q…3f6s

ID-Hub on Nostr: # 定义一个函数,检查字符串中是否包含中文字符 def ...

# 定义一个函数,检查字符串中是否包含中文字符
def contains_chinese(s):
for ch in s:
if u'\u4e00' <= ch <= u'\u9fff':
return True
return False

这个判断字符串中是否包含中文字符的算法,会把日文看成中文😂
Author Public Key
npub1nr06h4rzntertpj2lzpgje6mxt9hetjk5ffn78suy9525esqn0rq2wnzyk