
Security News
pnpm 10.12 Introduces Global Virtual Store and Expanded Version Catalogs
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Easier string manipulation for people who come from LTR backgrounds.
Create a new RtlString
instance with some Arabic text. Calling .to_s
will show an LTR representation of the string. You should read it from left to right, just like you would an English string:
arabic_str = [1575, 1605, 32, 98, 108, 97, 114, 103, 32, 1576, 1573, 1590].pack("U*")
RtlString.new(arabic_str).to_s # => "[alef][meem] blarg [beh][alef - hamza below][dad]"
You can also call .to_rtl_s
on a regular string:
arabic_str.to_rtl_s # => "[alef][meem] blarg [beh][alef - hamza below][dad]"
Instances of RtlString
respond to a few additional string operations, including delete_at
, insert
, []
, and size
:
str = arabic_str.to_rtl_s
str.delete_at(1) # => "[meem]"
str.delete_range(1..2)
str.insert([1605].pack("U*"), 1)
str.to_s # => "[alef][meem][meem] blarg [beh][alef - hamza below][dad]"
str[1] # => "[meem]
str[1..3] # => "[meem] b"
str.size # => 12
str.length # => 12
Depends on the twitter-cldr-rb gem.
bundle exec rspec
FAQs
Unknown package
We found that rtl-string demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.
Security News
Amaro 1.0 lays the groundwork for stable TypeScript support in Node.js, bringing official .ts loading closer to reality.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.