examples the first

This commit is contained in:
Schrottkatze 2021-12-16 09:40:17 +01:00
parent 1f59a4a874
commit e2b1af59b4
2 changed files with 46 additions and 3 deletions

View file

@ -1 +1,44 @@
fuck java
#mult /}}string{{str\ /{float}num\ |
¿string * float?
&& rest line comment
]]Inline comment[[
``
multiline comment
indention example (comments have to be indented as well, btw):
first level
second level
third level
fourth level
fifth level
sixth level
main function has to be a thing
´´
¡}}string{{ variable!
&& take input into variable
¡=>/variable\!
&& output variable
¡<=/variable\!
&& $ means true
&& € means false
&& if condition is true log the text
¿??$/condition\ |
¡<=/"condition was true"!
?
&& if condition is false log the text
¿??€/condition\ |
¡<=/"condition was false"!
?
¿??$/condition\ |
¡<=

View file

@ -9,8 +9,8 @@ fn main() {
fn multiply_strings(str: String, multiplier: f32) -> String {
let mut r: String = String::from(str);
let mult_float = multiplier - (multiplier as i32) as f32;
let slice = &r.clone()[0..(r.len() as f32 * mult_float) as usize];
let rest = multiplier - (multiplier as i32) as f32;
let slice = &r.clone()[0..(r.len() as f32 * rest) as usize];
r = r.repeat(multiplier as usize);
r += slice;