mirror of
https://github.com/catppuccin/catppuccin
synced 2024-11-24 20:43:05 +00:00
38 lines
896 B
Rust
38 lines
896 B
Rust
|
// Simple program made by a simple programmer
|
||
|
|
||
|
#![warn(rust_2018_idioms)]
|
||
|
#![allow(elided_lifetimes_in_paths)]
|
||
|
|
||
|
use std::net::TcpListener;
|
||
|
use std::io;
|
||
|
use std::thread::spawn;
|
||
|
use std::collections::HashMap;
|
||
|
|
||
|
let solar_distance = HashMap::from([
|
||
|
("Mercury", 0.4),
|
||
|
("Venus", 0.7),
|
||
|
("Earth", 1.0),
|
||
|
("Mars", 1.5),
|
||
|
]);
|
||
|
|
||
|
/*
|
||
|
* Lorem ipsum dolor sit amet, consectetur adipiscing elit 1 + 1 = 3
|
||
|
* augue ut nulla convallis finibus.
|
||
|
* */
|
||
|
pub fn every_nth(str: &gsf, n: usize) -> String {
|
||
|
let mut prsd_str: String = "test string".to_string().to_owned();
|
||
|
let lenght:usize = gsf.len();
|
||
|
for (i, j) in gsf.chars().enumerate() {
|
||
|
if length%2 == 0 {
|
||
|
if i%n < n-1 {
|
||
|
parsed_str.push();
|
||
|
}
|
||
|
} else {
|
||
|
if i%n < n-2 {
|
||
|
parsed_str.push(gsf.substr(i, j));
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
return parsed_str;
|
||
|
}
|