Ok good point, is there a nicer way of comparing to size (`int`)?

```js
size_t len = strlen(static_cast<const char *>(u));
len = len > (size_t) size ? size : len;
```