str_start(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– str_start(3) β€” Library Functions Manual ✨

okay bestie, welcome to the str_start page, fresh off the Library Functions Manual press πŸŽ€ she's a tiny function with one job and she does it flawlessly, no cap.


🌸 NAME 🌸

str_start β€” compare prefixes of strings πŸ¦‹

like. she checks if one string is the beginning of another. that's the whole vibe. iykyk.


✨ SYNTAX ✨

#include <libowfat/str.h>

size_t str_start(const char* a,const char* b);

yes the include is literally <libowfat/str.h>, don't @ me, just paste it in πŸ’…


πŸ‘‘ DESCRIPTION πŸ‘‘

str_start returns 1 if b is a prefix of a, and 0 otherwise.

that's it. that's the function. main character energy with zero drama ✨

so like, quick vibe check: is b sitting right at the front of a, all cozy, matching character for character? then you get a 1. if not? 0. no in-between, no maybe, she's not ambiguous πŸ’€

fr fr that's the whole contract. read it, love it, ship it 🫢


πŸŽ€ SEE ALSO πŸŽ€

  • strncmp(3) β€” go give her a lil visit too, she's the cousin who does the actual comparing πŸ’–

and that's the page, bestie!! 🧚 you just read the str_start(3) manual page from the Library Functions Manual, and honestly? iconic of you. go forth and prefix-compare responsibly πŸŒˆπŸ’œβ­