| 1 | module util |
| 2 | |
| 3 | pub fn skip_bom(file_content string) string { |
| 4 | mut raw_text := file_content |
| 5 | if raw_text.len >= 3 { |
| 6 | js_text := raw_text.str |
| 7 | _ := js_text |
| 8 | #if (js_text.charCodeAt(0) == 0xEF && js_text.charCodeAt(1) == 0xBB && js_text.charCodeAt(2) == 0xBF) |
| 9 | |
| 10 | { |
| 11 | #raw_text.str = js_text.slice(3,js_text.length); |
| 12 | } |
| 13 | } |
| 14 | return raw_text |
| 15 | } |
| 16 |