Skip to content

alwaysday1/twitter-character-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Twitter Character Counter

A Go package to accurately count the length of a tweet according to Twitter's character counting rules.

Online site

Features

  • Accurately counts tweet length based on Twitter's rules
  • Handles URLs and special characters correctly
  • Easy to integrate into existing Go projects

Installation

go get github.com/alwaysday1/twitter-character-counter

Usage

package main

import (
    "fmt"
    "github.com/alwaysday1/twitter-character-counter"
)

func main() {
    postContent := "12345678"
    length := twittercharacter.CountTweet(postContent)
    fmt.Printf("Tweet length: %d\n", length)
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages