Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Class that parses chat strings for @mentions, (emoticons), and http:// urls links.

Notifications You must be signed in to change notification settings

ralphpina/ChatStrings

Repository files navigation

ChatStrings

Class that parses chat strings for @mentions, (emoticons), and http:// urls links.

I am using Jsoup to get parse the html links and get their title attribute. I am also using Gson to build the JSON objects and convert them to Strings. I am using Gson because it is a very fast JSON parser and allows me to use annotated objects to describe my JSON objects.

To run this file you would run ChatStringsExample which has a main method and sample strings. To compile the example: $ javac ChatStringsExample.java Then to run it: $ java -classpath gson-2.2.4.jar:jsoup-1.7.3.jar:. ChatStringsExample


If you want to edit the main class, ChatStrings, you would need to recompile it: To compile ChatStrings.java you must include Jsoup and Gson in the class path and execute: $ javac -classpath gson-2.2.4.jar:jsoup-1.7.3.jar ChatStrings.java

To compile the tests: $ javac -cp .:junit-4.11.jar ChatStringsTest.java To run the tests you would execute in the main directory: $ java -cp .:junit-4.11.jar:hamcrest-core-1.3.jar:gson-2.2.4.jar:jsoup-1.7.3.jar org.junit.runner.JUnitCore ChatStringsTest

About

Class that parses chat strings for @mentions, (emoticons), and http:// urls links.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /