ZyanStringView_(3)

πŸ“¦
version 1.5.2 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– ZyanStringView_(3) πŸ’–

okay bestie, welcome to the ZyanStringView page from the Library Functions Manual ✨ this one lives in the Zycore library and it's literally just a cute little struct manual, but we're gonna make it make sense, fr fr 🫢


🌸 NAME 🌸

ZyanStringView_ β€” the struct of all time, the view queen πŸ‘‘


✨ SYNOPSIS ✨

#include <String.h>

Public Attributes

  • ZyanString string

πŸ’… Detailed Description πŸ’…

So. This page defines the ZyanStringView struct. That's the whole assignment. πŸŽ€

The ZyanStringView type is a view β€” like a little window β€” inside a string. And when we say string, we mean any of these, no gatekeeping:

  • ZyanString instances,
  • null-terminated C-style strings,
  • or even not-null-terminated custom strings 🌈

A view is immutable by design. It's giving "look but don't touch", and it can't be directly converted to a C-style string. That's just not a thing it does, bestie.

⚠️ Big yikes warning: views might become invalid (like, pointing to invalid memory 😭) if the underlying string gets destroyed or resized. Guard your views like you guard your peace.

The ZYAN_STRING_TO_VIEW macro can be used to cast a ZyanString to a ZyanStringView pointer with no runtime overhead β€” zero, none, free.99, we love to see it πŸ‘‘

But casting a view back to a normal string? Not supported. It will lead to unexpected behavior. Instead, use ZyanStringDuplicate to create a deep-copy, periodt πŸ’…

πŸ”’ And listen: all fields in this struct should be considered as "private". Any changes may lead to unexpected behavior. Respect the privacy, it's giving boundaries 🫢

πŸ¦‹ Member Data Documentation πŸ¦‹

ZyanString ZyanStringView_::string

The string data. πŸ“¦

The view internally re-uses the normal string struct to allow casts without any runtime overhead. That's the whole trick β€” it's iconic, it's efficient, iykyk ✨


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Zycore from the source code. Not a human, just vibes and automation πŸ€–πŸ’–


and that's the page babes!! no cap, you now know the ZyanStringView_ struct better than most πŸ’…

Zycore Β· Version 1.5.2.0 Β· ZyanStringView_(3) β€” mwah, thanks for reading, slay πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from