vlang / ved

1 MB text editor written in V with hardware accelerated text rendering. Compiles in <1s.
GNU General Public License v3.0
1.34k stars 78 forks source link

use `string.len_utf8()` instead of `utf8_str_len(string)` #139

Closed StunxFS closed 1 year ago

StunxFS commented 2 years ago

Fix notice:

./ved.v:475:15: notice: function `utf8_str_len` will be deprecated after 2022-05-28, and will become an error after 2022-11-24; use `string.len_utf8()` instead
  473 |         // Handle utf8 codepoints
  474 |         // old_len := s.len
  475 |         if s.len != utf8_str_len(s) {
      |                     ~~~~~~~~~~~~~~~
  476 |             u := s.runes()
  477 |             if max > 0 && max < u.len {
medvednikov commented 2 years ago
/home/runner/work/ved/ved/ved/view.v is not vfmt'ed
/home/runner/work/ved/ved/ved/ved.v is not vfmt'ed
StunxFS commented 1 year ago

@medvednikov vfmt'ed

medvednikov commented 1 year ago

Already fixed on master.