Skip to content

Parsing message and find meta information like hashtags or links.

Notifications You must be signed in to change notification settings

jwest/message-meta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Message meta parser

Build Status

Parsing message and find meta information like hashtags or links.

Usage

To use the library just add:

message-meta = "^0.2"

to your dependencies.

extern crate message_meta;

fn main() {
  let meta = message_meta::parse("test message https://google.com/ #hashtag test");
     
  assert_eq!(meta.message, "test message https://google.com/ #hashtag test");
  assert_eq!(meta.links.len(), 1);
  assert_eq!(meta.links[0].url, "https://google.com/");
  assert_eq!(meta.hashtags.len(), 1);
  assert_eq!(meta.hashtags[0].name, "#hashtag1");
}

About

Parsing message and find meta information like hashtags or links.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages