Twitter Text Libraries. This code is used at Twitter to tokenize and parse text to meet the expectations for what can be used on the platform.

Overview

twitter-text

This repository is a collection of libraries and conformance tests to standardize parsing of Tweet text. It synchronizes development, testing, creating issues, and pull requests for twitter-text's implementations and specification. These libraries are responsible for determining the quantity of characters in a Tweet and identifying and linking any URL, @username, #hashtag, or $cashtag.

See implementations and conformance in this repository below:

Other language implementations

The following implementations exist in other programming languages, but are not supported by or used by Twitter. We'd like to thank the authors for building and maintaining these alternatives.

If you would like to contribute a link to other implementations, please consider sending a Pull Request, or letting us know via the Twitter Developer Community forums.

Copyright and License

Copyright 2012-2020 Twitter, Inc and other contributors

Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0

Comments
  • Do not count photos and @mentions in 140 character count

    Do not count photos and @mentions in 140 character count

    "The social media company will soon stop counting photos and links as part of its 140-character limit for messages, according to a person familiar with the matter." (Source)

    Will this library be updated to match these changes?

    opened by rinogo 15
  • NoMethodError Exception: undefined method `[]' for nil:NilClasswhen using gem in rails app

    NoMethodError Exception: undefined method `[]' for nil:NilClasswhen using gem in rails app

    We've found an odd error trying to use twitter-text in a rails app. It works fine from the irb, and so we are a little confused.

    Here's it all good in IRB:

    [tansaku@Samuels-MBP:~/Documents/Github/AgileVentures/LocalSupport (131428629_automated_posting_to_social_media_feeds)]$ 
    → bundle exec irb
    2.4.2 :001 > require 'twitter-text'
     => true 
    2.4.2 :002 > include Twitter::Validation
     => Object 
    2.4.2 :003 > parse_tweet "Test Tweet 4 https://www.harrowcn.org.uk/"
     => {:weighted_length=>36, :valid=>true, :permillage=>128, :valid_range_start=>0, :valid_range_end=>40, :display_range_start=>0, :display_range_end=>40} 
    

    here's the full stack trace when we try to run in a test:

      1) TwitterApi Posting to twitter should be able to post 280 chars or less to twitter
         Failure/Error: result = parse_tweet(tweet)
         
         NoMethodError:
           undefined method `[]' for nil:NilClass
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/twitter-6.2.0/lib/twitter/base.rb:128:in `attr_falsey_or_empty?'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/twitter-6.2.0/lib/twitter/base.rb:86:in `block in define_attribute_method'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `call'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:117:in `block (3 levels) in create_memoized_method'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/memory.rb:63:in `block (3 levels) in fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/thread_safe-0.3.6/lib/thread_safe/cache.rb:56:in `fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/memory.rb:62:in `block (2 levels) in fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/memory.rb:61:in `block in fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/thread_safe-0.3.6/lib/thread_safe/cache.rb:56:in `fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/memory.rb:60:in `fetch'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/memoizable-0.4.2/lib/memoizable/method_builder.rb:116:in `block (2 levels) in create_memoized_method'
         # /Users/tansaku/.rvm/gems/ruby-2.4.2/gems/twitter-text-2.0.2/lib/twitter-text/validation.rb:41:in `parse_tweet'
         # ./app/services/twitter_api.rb:22:in `post_to_twitter'
         # ./spec/services/twitter_api_spec.rb:17:in `block (3 levels) in <top (required)>'
    

    It seems like when we have the twitter gem in a rails app that this somehow interferes with the twitter-text gem - so that configuration gets looked up in the twitter gem and that breaks for some reason. When we remove the twitter gem from the rails app then we don't get the above error.

    opened by tansaku 14
  • "for of" loop is not supported by legacy browsers.

    -Adding babel-polyfill for supporting older browsers -Resolves #247 -Resolves error ReferenceError: Can't find variable: Symbol in bower_components/twitter-text/js/pkg/twitter-text-2.0.2.js (line 854)

    opened by rcastera 11
  • Symlink destination does not exist, so that require fails

    Symlink destination does not exist, so that require fails

    Just doing require 'twitter-text' fails because symbolic link destination oflib/assets/tld_lib.yml that is lib/assets/../../../conformance/tld_lib.yml does not exsit as follows.

    /Users/nyoho/.rbenv/versions/2.3.3/lib/ruby/2.3.0/psych.rb:474:in `initialize': No such file or directory @ rb_sysopen - /Users/nyoho/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/twitter-text-1.14.3/lib/assets/tld_lib.yml (Errno::ENOENT)
    

    It occurs from version 1.14.3. It might be better to replace the symlink with a real file. (?)

    bug 
    opened by Nyoho 10
  • Domains and emails with non-ASCII characters are not hyperlinked

    Domains and emails with non-ASCII characters are not hyperlinked

    Email Address Internationalization (EAI) is not hyperlinked correctly.

    Here is the link to the tweet: https://twitter.com/datamail_in/status/1055140179089022976?s=19

    The email address with non-ASCII character in the above tweet is valid and expected to have a hyperlink when typed in twitter application.

    A quick guide that explains the expected behavior of a correct linkification is here: https://uasg.tech/wp-content/uploads/2017/06/UASG010-Quick-Guide-to-Linkification.pdf

    It only linkifies until it comes across "á" letter. There is no link below "á" character.

    Internationalized Domain Names (IDNs) permit the global community to use a domain name in their native language or script. This is enabled by allowing domain names to have characters from different scripts, beyond the letters (a to z), digits (0 to 9) and hyphen (-), as encoded by the Unicode standard and as allowed by relevant IDN protocols.

    Email Address Internationalization (EAI) is the protocol that allows email addresses with IDNs in the domain part and/or Unicode (non-ASCII) characters in the Local part of the Mailbox name. Please see the quick guide for EAI from here: https://uasg.tech/wp-content/uploads/2017/02/UASG014_20170206.pdf

    Kindly please look into this issue.

    Thank you in advance.

    opened by UA2018 9
  • Emojis are not properly counted

    Emojis are not properly counted

    Take as an example "Hand from back with index finger pointing right" emoji 👉

    • When you use getTweetLength it is counted as 1 character
    • But when you add this emoji directly into twitter.com tweet editor it is counted as 2 characters

    Same problem can be found with multiple other emojis. As an example: 👩‍💻👨‍💻 are counted as 5 characters each by Twitter.com and 3 characters each by getTweetLength

    It can be easily reproduced here: https://npm.runkit.com/twitter-text

    var twitterText = require("twitter-text")
    
    var text = "👉"
    
    var tweetLength = twitterText.getTweetLength(text)
    var jsLength = text.length
    
    var response = `getTweetLength: ${tweetLength}, jsLength ${jsLength}`
    
    javascript 
    opened by gwidonw 9
  • 1️⃣This emoji has not been accurately parse on parseTweet

    1️⃣This emoji has not been accurately parse on parseTweet

    1️⃣This emoji has not been accurately parse on parseTweet version: 3.0.1

    Expected behavior

    should be parsed as invalid

    Actual behavior

    This snippet is officially invalid, but the result of parseTweet is determined to be valid.

    Steps to reproduce the behavior

    1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣1️⃣
    

    Do a parseTweet on this snippet

    opened by eretica 8
  • Simplify some regexes, add support to match hashtags in astral plane

    Simplify some regexes, add support to match hashtags in astral plane

    Ok, this one is kind of big, so it needs some explanation.

    My original intent was to kill off twttr.txt.addCharsToCharClass and use RegEx literals when possible to make the library smaller and reduce startup coasts. That's when I realized in ruby, java, and objc, hashtags are being matched by the unicode-aware char classes for letters \p{L] and markers \p{M} but JavaScript doesn't have that, so is using a subset of that with no support for characters outside the basic multilingual plane (astral panes) that use surrogate pairs in UTF16.

    The solution

    1. Find a suitable substitute for the complete set of unicode letters and markers. I got this from https://github.com/slevithan/xregexp/blob/master/src/addons/unicode-categories.js I'm not sure where we got the "unicodeLettersAndMarks" list previously, but it is missing everything from the astral planes.
    2. Alter the regular expressions for hashtags to use matching groups and negative matching groups instead of char classes and negative char classes. This was probably the most difficult part. The trickiest thing was how to negate a group in JavaScript. My solution was to do a negative lookahead followed by a match on the next complete code point (surrogate pair or normal char) This happens to work because the group can only match a single char unit or two units if it is in the astral plane.
    3. Measure the increase in library size and reduction in match performance. The gzipped size goes up a little (8%) and the speed of matching goes down a little (15%) but I think it is worth it to have full coverage of all unicode hashtags. A major optimization (2x) was bypassing astral plane lookups if a bmp lookahead did not match Example: (?=#{non_bmp_code_pairs})(?:#{unicodeAstralLetters}|#{unicodeAstralMarks})
    4. Add unit tests I added a couple conformance tests for astral plane letters and marks

    I am particularly interested in hearing from @edengol since he did this excellent PR: https://github.com/twitter/twitter-text/pull/7 Sad to see him leave the flock, though https://twitter.com/edeng/status/705092008071696384

    opened by twuttke 8
  • Using Gson instead of Jackson to parse static json files. #232

    Using Gson instead of Jackson to parse static json files. #232

    jackson-databind dependency adds 11347 methods to bundle. http://www.methodscount.com/?lib=com.fasterxml.jackson.core%3Ajackson-databind%3A2.8.7

    This is devastating for android apps which usually aim to be below 64k method limit. I have substituted it with Gson 2.8.2, which only adds around 1345 methods

    http://www.methodscount.com/?lib=com.google.code.gson%3Agson%3A2.8.0

    (this is for 2.8.0, this site doesn't show it for 2.8.2, but I have counted it locally with dexcount-gradle-plugin and it has 832 methods after being proguarded).

    opened by denisk20 7
  • js parseTweet breaks on 2-letter tld

    js parseTweet breaks on 2-letter tld

    message = "Let's get humans living on #mars t.co";
    twttr.txt.parseTweet(message);
    

    Same results if I add a path or a scheme to the url ( t.co/poo or http://t.co/poo).

    Yields this error every other time entered in the console.

    Uncaught TypeError: Cannot read property 'toASCII' of undefined at Object.toAscii var punycodeEncodedLabel = punycode.toASCII(label);

    Edit: Just realized that these are all the same issue. Adding a path (as @codemonkey3045 has suggested) or a scheme doesn't help. https://github.com/twitter/twitter-text/issues/200 https://github.com/twitter/twitter-text/issues/171 https://github.com/twitter/twitter-text/issues/153

    javascript 
    opened by iantheparker 7
  • 280 characters

    280 characters

    Hiya,

    Now that 280 characters has rolled out to all users, can we get an update that handles this (and the special rules for what characters count double)?

    Thanks, G

    opened by v21 7
  • Bump json5 from 2.1.0 to 2.2.3 in /js

    Bump json5 from 2.1.0 to 2.2.3 in /js

    Bumps json5 from 2.1.0 to 2.2.3.

    Release notes

    Sourced from json5's releases.

    v2.2.3

    v2.2.2

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1

    • New: package.json and package.json5 include a module property so bundlers like webpack, rollup and parcel can take advantage of the ES Module build. (#208)
    • Fix: stringify outputs \0 as \\x00 when followed by a digit. (#210)
    • Fix: Spelling mistakes have been fixed. (#196)
    Changelog

    Sourced from json5's changelog.

    v2.2.3 [code, diff]

    v2.2.2 [code, diff]

    • Fix: Properties with the name __proto__ are added to objects and arrays. (#199) This also fixes a prototype pollution vulnerability reported by Jonathan Gregson! (#295).

    v2.2.1 [code, diff]

    • Fix: Removed dependence on minimist to patch CVE-2021-44906. (#266)

    v2.2.0 [code, diff]

    • New: Accurate and documented TypeScript declarations are now included. There is no need to install @types/json5. (#236, #244)

    v2.1.3 [code, diff]

    • Fix: An out of memory bug when parsing numbers has been fixed. (#228, #229)

    v2.1.2 [code, diff]

    • Fix: Bump minimist to v1.2.5. (#222)

    v2.1.1 [code, [diff][d2.1.1]]

    ... (truncated)

    Commits
    • c3a7524 2.2.3
    • 94fd06d docs: update CHANGELOG for v2.2.3
    • 3b8cebf docs(security): use GitHub security advisories
    • f0fd9e1 docs: publish a security policy
    • 6a91a05 docs(template): bug -> bug report
    • 14f8cb1 2.2.2
    • 10cc7ca docs: update CHANGELOG for v2.2.2
    • 7774c10 fix: add proto to objects and arrays
    • edde30a Readme: slight tweak to intro
    • 97286f8 Improve example in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    javascript dependencies 
    opened by dependabot[bot] 0
  • 😳

    😳

    Describe the bug A clear and concise description of what the bug is.

    To Reproduce Steps to reproduce the behavior:

    1. Go to '...'
    2. Click on '....'
    3. Scroll down to '....'
    4. See error

    Expected behavior A clear and concise description of what you expected to happen.

    Screenshots If applicable, add screenshots to help explain your problem.

    Environment For web, specify your OS and browser version. For mobile, specify device, OS and version. For libraries, what version of build tools are you using?

    Additional context Add any other context about the problem here.

    opened by Alucaz2022 0
  • Bump qs from 6.5.2 to 6.5.3 in /js

    Bump qs from 6.5.2 to 6.5.3 in /js

    Bumps qs from 6.5.2 to 6.5.3.

    Changelog

    Sourced from qs's changelog.

    6.5.3

    • [Fix] parse: ignore __proto__ keys (#428)
    • [Fix] utils.merge: avoid a crash with a null target and a truthy non-array source
    • [Fix] correctly parse nested arrays
    • [Fix] stringify: fix a crash with strictNullHandling and a custom filter/serializeDate (#279)
    • [Fix] utils: merge: fix crash when source is a truthy primitive & no options are provided
    • [Fix] when parseArrays is false, properly handle keys ending in []
    • [Fix] fix for an impossible situation: when the formatter is called with a non-string value
    • [Fix] utils.merge: avoid a crash with a null target and an array source
    • [Refactor] utils: reduce observable [[Get]]s
    • [Refactor] use cached Array.isArray
    • [Refactor] stringify: Avoid arr = arr.concat(...), push to the existing instance (#269)
    • [Refactor] parse: only need to reassign the var once
    • [Robustness] stringify: avoid relying on a global undefined (#427)
    • [readme] remove travis badge; add github actions/codecov badges; update URLs
    • [Docs] Clean up license text so it’s properly detected as BSD-3-Clause
    • [Docs] Clarify the need for "arrayLimit" option
    • [meta] fix README.md (#399)
    • [meta] add FUNDING.yml
    • [actions] backport actions from main
    • [Tests] always use String(x) over x.toString()
    • [Tests] remove nonexistent tape option
    • [Dev Deps] backport from main
    Commits
    • 298bfa5 v6.5.3
    • ed0f5dc [Fix] parse: ignore __proto__ keys (#428)
    • 691e739 [Robustness] stringify: avoid relying on a global undefined (#427)
    • 1072d57 [readme] remove travis badge; add github actions/codecov badges; update URLs
    • 12ac1c4 [meta] fix README.md (#399)
    • 0338716 [actions] backport actions from main
    • 5639c20 Clean up license text so it’s properly detected as BSD-3-Clause
    • 51b8a0b add FUNDING.yml
    • 45f6759 [Fix] fix for an impossible situation: when the formatter is called with a no...
    • f814a7f [Dev Deps] backport from main
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    javascript dependencies 
    opened by dependabot[bot] 0
  • Bump decode-uri-component from 0.2.0 to 0.2.2 in /js

    Bump decode-uri-component from 0.2.0 to 0.2.2 in /js

    Bumps decode-uri-component from 0.2.0 to 0.2.2.

    Release notes

    Sourced from decode-uri-component's releases.

    v0.2.2

    • Prevent overwriting previously decoded tokens 980e0bf

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.1...v0.2.2

    v0.2.1

    • Switch to GitHub workflows 76abc93
    • Fix issue where decode throws - fixes #6 746ca5d
    • Update license (#1) 486d7e2
    • Tidelift tasks a650457
    • Meta tweaks 66e1c28

    https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.1

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    javascript dependencies 
    opened by dependabot[bot] 0
Releases(v3.0.1)
LDOMarkdownParser - Parse (some) markdown attributes into an NSAttributedString

LDOMarkdownParser Description Convert markdown text styling into an NSAttributed

Lurado 1 Feb 4, 2022
A set of libraries to help users find and replace native system emojis with EmojiOne in their app or website.

This repository is now maintained as JoyPixels/emoji-toolkit. You'll find the latest version of our resources at emoji-toolkit. Please see the UPGRADE

JoyPixels Inc. 4.5k Dec 24, 2022
Powerful text framework for iOS to display and edit rich text.

YYText Powerful text framework for iOS to display and edit rich text. (It's a component of YYKit) Features UILabel and UITextView API compatible High

null 8.8k Jan 4, 2023
An iOS app to turn typed text into images of handwritten text in your own handwriting style.

Text-to-Handwritting © 2021 by Daniel Christopher Long An iOS app to turn typed text into images of handwritten text in your own handwriting style. ht

Daniel Long 11 Dec 29, 2022
A Cross-Platform String and Regular Expression Library written in Swift.

Guitar ?? A Cross-Platform String and Regular Expression Library written in Swift. About This library seeks to add common string manipulation function

Arthur Ariel Sabintsev 659 Dec 27, 2022
AttributedText is a Swift µpackage that provides NSAttributedString rendering in SwiftUI by wrapping either an NSTextView or a UITextView depending on the platform.

AttributedText AttributedText is a Swift µpackage that provides NSAttributedString rendering in SwiftUI by wrapping either an NSTextView or a UITextVi

null 1 Jul 18, 2022
More powerful label, attributed string builder and text parser.

DDText More powerful label, attributed string builder and text parser. DDLabel More powerful label than UILabel, using TextKit. It supports features b

Daniel 16 Nov 8, 2022
Swift String Validator. Simple lib for ios to validate string and UITextFields text for some criterias

Swift String validator About Library for easy and fastest string validation based on сciterias. Instalation KKStringValidator is available through Coc

Kostya 17 Dec 21, 2019
🌍⏩📄 Convert ISO8859 1-16 Encoded Text to String in Swift. Supports iOS, tvOS, watchOS and macOS.

ISO8859 Convert ISO8859 1-16 Encoded Text to String in Swift. Usage let encoding = ISO8859.part1 let string = String([...], iso8859Encoding: encoding)

Devran Cosmo Uenal 18 Jan 2, 2023
Fully open source text editor for iOS written in Swift.

Edhita Fully open source text editor for iOS written in Swift. http://edhita.bornneet.com/ What Edhita means? Edhita (Romaji) == エディタ (Katakana) == Ed

Tatsuya Tobioka 1.2k Jan 1, 2023
RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing.

RichEditorView RichEditorView is a simple, modular, drop-in UIView subclass for Rich Text Editing. Written in Swift 4 Supports iOS 8+ through Cocoapod

Caesar Wirth 1.8k Dec 24, 2022
Like a SwiftUI ViewBuilder, but for Text

TextBuilder Introduction Text composition in SwiftUI can often be cumbersome, especially when there's logic affecting its format and content. TextBuil

David Roman 180 Dec 26, 2022
A standalone, flexible API that provides a full-featured rich text editor for iOS applications.

Twitter Text Editor A standalone, flexible API that provides a full featured rich text editor for iOS applications. This provides a robust text attrib

Twitter 2.8k Dec 29, 2022
Get any text on your screen into your clipboard.

macOCR macOCR is a command line app that enables you to turn any text on your screen into text on your clipboard. When you envoke the ocr command, a "

Marcus S 1.9k Dec 29, 2022
A lightning fast, native SwiftUI scratchpad/text editor.

Sedit A lightning fast, native SwiftUI scratchpad/text editor. Sedit (Swift Edit, as in the language and as in fast) is a lightning fast basic text ed

null 5 Jan 28, 2022
Convert text with HTML tags, links, hashtags, mentions into NSAttributedString. Make them clickable with UILabel drop-in replacement.

Atributika is an easy and painless way to build NSAttributedString. It is able to detect HTML-like tags, links, phone numbers, hashtags, any regex or

Pavel Sharanda 1.1k Jan 8, 2023
Automatic summarizer text in Swift

Overview Reductio is a tool used to extract keywords and phrases using an implementation of the algorithm TextRank. Installation Swift Package Manager

Sergio Fernández 438 Dec 9, 2022
Magnifying glass for text fields

Loupe Magnifying glass for text fields. Apple removed the maginifying glass when selecting texts since iOS 13, this tweak will brings it back. Compati

null 9 Dec 24, 2022
Acčento is an easy-to-use tool for adding Czech diacritics to copied text.

Acčento is an easy-to-use tool for adding Czech diacritics to copied text. The app lives in the menu bar and is activated using a global hot key.

Matty Cross 3 Sep 16, 2021