Compare commits

...

2 Commits

Author SHA1 Message Date
Shadowfacts 3d2e5b72a4 Fix title case 2023-03-21 16:50:43 -04:00
Shadowfacts 3602a0218c Fix superscript 2023-03-21 16:48:17 -04:00
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
```
title = "Tusker is now Available"
title = "Tusker is Now Available"
tags = ["swift"]
date = "2023-01-23 11:00:42 -0500"
short_desc = ""

View File

@ -37,7 +37,7 @@ let data = Data(buffer: buf)
let code = String(data: data, encoding: .utf8)!
```
You may notice that the code string length is being passed into the function as an unsigned 64-bit integer, and then being converted to an `Int`, which may not be capable of representing the value. But, since this is just a syntax highlighter for my blog, there's absolutely no chance of it ever being used to highlight a string longer than 2^63-1 bytes.
You may notice that the code string length is being passed into the function as an unsigned 64-bit integer, and then being converted to an `Int`, which may not be capable of representing the value. But, since this is just a syntax highlighter for my blog, there's absolutely no chance of it ever being used to highlight a string longer than 2<sup>63</sup>-1 bytes.
The actual highlighting I'll skip, you can refer to the documentation for Splash. Once that's done, though, the output needs to be sent back to Rust somehow. Again, since the function signature needs to be compatible with C, it returns a pointer to a byte buffer containing the UTF-8 encoded string. It also sets a length pointer provided by the caller to the length in bytes of the output.