1.0.1 • Published 8 years ago

wcwidth v1.0.1

Weekly downloads
6,509,309
License
MIT
Repository
github
Last release
8 years ago

wcwidth

Determine columns needed for a fixed-size wide-character string


wcwidth is a simple JavaScript port of wcwidth implemented in C by Markus Kuhn.

JavaScript port originally written by Woong Jun woong.jun@gmail.com (http://code.woong.org/)

Example

'한'.length    // => 1
wcwidth('한');   // => 2

'한글'.length    // => 2
wcwidth('한글'); // => 4

wcwidth() and its string version, wcswidth() are defined by IEEE Std 1002.1-2001, a.k.a. POSIX.1-2001, and return the number of columns used to represent the given wide character and string.

Markus's implementation assumes the wide character given to those functions to be encoded in ISO 10646, which is almost true for JavaScript's characters.

Further explaination here

License

MIT

columnifyeasy-select-rnvuedragdropuploadimagesreact-native-bluetooth2killi8n-react-native-fast-imagecad-clivue.jquery-termianl@cashremit/cr-streamline-iconsreact-native-template-rfbase@nyadam/oraairscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxfdeneme323112@texttree/demo-bsa-reference-rcl@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modauto-extractreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testcogoportutilsdyx-reacttalent-to-vite-cliwilscanner@oiti/documentoscopy-react-native@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@easyrn/erpush-cli@infinitebrahmanuniverse/nolb-wc@prodam/prodam-typesdragonstyle-testplginshamsi-date-nowexpand-react-bridgeluminos-ui-coreiqra-calculatorjawwy-sdkjawwy_gamification_release@everything-registry/sub-chunk-3118@314oner_npm/universal-components-libraryreact-native-sphereuisphereuijawwy_libraryreact-native-credit-card-pkgreact-native-jawwy_samplecode-msi-simple_calculator123zs89cli-number-guessingkny63-atm-machinekshahmeer10_atmatm_process@uf3sindh/simple_cli_calculatorreact-native-chenaarreact-native-responsive-sizepayutesting@dskdavid/flash_cliflyfmslfm-receiver-toolgatiss2-my-calculatorss35-currency-converterss78_number_guessing_game@collexx/abibiometric-stbirken-react-native-community-image-editorbisma-simple-calculatorsk-to-do-listbreakwordstock-ticker-react-widget@corelmax/react-native-my2c2p-sdksticky-scroll-catch@con-test/react-native-concent-commoncroatiademo-test-scrnuse_atm_machineusman-npx-simple-calculatorcssesc-wbgtype-libarydesign-system-trial-milyasbpa@cryptocode99/token-listssyed-muhammad-mehdi-raza-zaidi-cli-atm-machinesyed123-calculator@digitalrakesh/jsuisyncbackbases@dimcheify/dimui@devorso/dcountdown@donapot/mylibtestchain_diggertaha-atm-machinecfb-cms-demo@dotconf-pro/dotconf-pro@dotconf-pro/dotenv
1.0.1

8 years ago

1.0.0

10 years ago

0.0.0

10 years ago