Package detail

uni-string

bluelovers14.7kISC2.0.7

Unicode String object

ansi, astral, char, codepoints

readme

uni-string

Unicode-aware String object

npm install uni-string

api

demo

import UString from 'packages/uni-string/src/index';

const UString = require('packages/uni-string/src/index')
console.log(UString.support);

let t = (new UString('♥️𠬠典')).padStart(10, '𠬠');

t = t.concat('\n♥️𠬠典そこで彼らは\'",オリーブ山と呼ばれる山からエルサレムに帰った。');

console.dir(t);

let t2 = new UString(t);

console.log(t2);

//console.log(666, t2.substr(-9, 3));
console.log(666, t2.indexOf('𠬠典', 2));
console.log(666, t2.endsWith('𠬠典'));

let t3 = new UString('👩‍👩‍👧‍👦');
console.log(t3.size(), t3.split(''));
console.log('length', t2.length);
console.log('charLength', t2.charLength);
console.log('size()', t2.size());

//length 70
//charLength 49
//size() 49

UString.support

{ 
  split: true,
  substr: true,
  substring: true,
  indexOf: true,
  includes: true,
  slice: true,
  charAt: true,
  startsWith: true,
  endsWith: true,
  padEnd: true,
  padStart: true }

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

2.0.7 (2024-01-29)

🔖 Miscellaneous

2.0.6 (2023-11-24)

📌 Dependencies

2.0.5 (2023-04-12)

Note: Version bump only for package uni-string

2.0.4 (2023-04-12)

Note: Version bump only for package uni-string

2.0.3 (2022-11-01)

🔖 Miscellaneous

2.0.2 (2022-10-15)

📦 Code Refactoring

📌 Dependencies

🔖 Miscellaneous

2.0.1 (2022-09-16)

BREAKING CHANGES

  • update to tsdx

📦 Code Refactoring

🛠 Build System

🔖 Miscellaneous

1.1.17 (2022-08-27)

🔖 Miscellaneous

1.1.15 (2022-08-26)

♻️ Chores

🔖 Miscellaneous

1.1.14 (2022-08-26)

🔖 Miscellaneous

1.1.14 (2022-08-26)

🔖 Miscellaneous

1.1.13 (2022-08-26)

📦 Code Refactoring

🚨 Tests

🔖 Miscellaneous

1.1.12 (2022-01-17)

🔖 Miscellaneous

1.1.11 (2021-07-05)

📦 Code Refactoring

  • typescript: update override (3e438f9)

🛠 Build System

  • typescript: importHelpers (0716543)

1.1.10 (2020-06-20)

Note: Version bump only for package uni-string

1.1.9 (2020-06-10)

Note: Version bump only for package uni-string

1.1.8 (2020-06-07)

Features

1.1.7 (2020-06-06)

Bug Fixes

  • avoid jest snap with unicode title (7192534)

1.1.6 (2020-06-06)

Bug Fixes

  • jest snap with unicode title (8bb0b19)

1.1.5 (2020-06-06)

Bug Fixes

1.1.4 (2020-06-06)

Note: Version bump only for package uni-string

1.1.3 (2020-06-06)

Features

  • subtree import and update test (4a7a44c)