aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 3816377..43f23ef 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -110,14 +110,14 @@ fn pprint(ans: f64) {
110fn thousand_sep(inp:&str) -> String{ 110fn thousand_sep(inp:&str) -> String{
111 let mut result_string = String::new(); 111 let mut result_string = String::new();
112 for (i,c) in inp.to_string().chars().rev().enumerate(){ 112 for (i,c) in inp.to_string().chars().rev().enumerate(){
113 if i % 3 == 0 && i != 0{ 113 if i % 3 == 0 && i != 0 && c.to_string() != "-"{
114 result_string.push_str(","); 114 result_string.push_str(",");
115 result_string.push(c); 115 result_string.push(c);
116 continue 116 continue
117 } 117 }
118 result_string.push(c) 118 result_string.push(c)
119 } 119 }
120 let arrange:i16 = CONFIGURATION.fix as i16 - inp.len() as i16; 120 let arrange:i16 = CONFIGURATION.fix as i16 - result_string.len() as i16;
121 121
122 if arrange > 0 { 122 if arrange > 0 {
123 result_string.push_str(" ".repeat(arrange as usize).as_str()) 123 result_string.push_str(" ".repeat(arrange as usize).as_str())