Files
fastfetch/src/util/wcwidth.h
T
2024-01-23 10:19:02 +08:00

16 lines
252 B
C

#pragma once
#include <wchar.h>
#ifndef FF_HAVE_WCWIDTH
#include "3rdparty/wcwidch/wcwidth.h"
static inline int wcswidth(const wchar_t *pwcs, size_t n)
{
int res = 0;
while (n-- > 0)
res += wcwidth(*pwcs++);
return res;
}
#endif