shorturl-core 0.1.0

短网址核心功能
Documentation
  • Coverage
  • 0%
    0 out of 3 items documented0 out of 2 items with examples
  • Size
  • Source code size: 6.79 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 547.03 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • r7n

短网址核心功能

用于将原始网址转换成6个字符长度的短网址。

引入

[dependencies]
shorturl-core = { git = "https://github.com/r7n/shorturl-core.git" }

直接使用

use shorturl_core::short_url;

let url:String = "r7n.cc".to_string();
let shorted_url:String = short_url(url); # 3TrFk7
println!("{}", shorted_url);

带 seed

use shorturl_core::short_url_with_seed;

let url:String = "r7n.cc".to_string();
let shorted_url:String = short_url_with_seed(url, 1u32); # 3KC4r5
println!("{}", shorted_url);