Giter Site home page Giter Site logo

rk0cc / unicode-string-contain-check Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 35 KB

String contain validation for non-Latin language system

Home Page: https://pypi.org/project/unicode-string-contain-check/

License: Apache License 2.0

Python 100.00%
python string comparison cjk-characters cjk python3 noarch

unicode-string-contain-check's Introduction

unicode-string-contain-check

This python package is performing in with UTF-8 encoded to support non-Latin charathers including CJK language

Testing Language Test result
Chinese (Simp.) Passed
Chinese (Trad.) Passed
Japanese Passed
Korean Passed

It should be fine for other language, otherwise, please create new issue to solve the problem


Usage

Import this package first:

import unicode_string_contain_check

Recommended ways:

# Name what you want
import unicode_string_contain_check as uin

Check does the word contain in the phrase:

if uin.utf_contain("遊戲保持了前作般的高自由度,玩家可以隨心所欲地進行","隨心所欲"):
    print("It's contain!!!")

The result wil be like this:

It's contain!!!

A python file should be looks like:

import unicode_string_contain_check as uin

if __name__ == "__main__":
    if uin.utf_contain("遊戲保持了前作般的高自由度,玩家可以隨心所欲地進行","隨心所欲"):
        print("It's contain!!!")

Guides

unf_contain(usr_input,target_text): Check does the target (target_text) contains in a string (usr_input)


License

Apache 2.0

unicode-string-contain-check's People

Contributors

rk0cc avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.