SBSTRING(3iv)

πŸ’– SbString(3IV) β€” bestie, it's the smart string class πŸ’–

Okay so this is SbString(3IV), the manual page for SbString β€” and no cap, it's kind of a baddie. πŸŽ€ It's the class for smart character strings, from the Inventor toolkit situation. Let's get into it.


✨ NAME ✨

SbString β€” class for smart character strings 🌸


πŸ¦‹ INHERITS FROM πŸ¦‹

SbString

yes bestie, it inherits from itself. the lore is wild. don't think about it too hard, just vibe. πŸ’…

🌈 SYNOPSIS 🌈

#include <Inventor/SbString.h>

Methods from class SbString:

                     SbString()
                     SbString(const char *str)
                     SbString(const char *str, int start, int end)
                     SbString(const SbString &str)
                     SbString(int digitString)
                     ~SbString()
 uint32_t            hash()
 int                 getLength() const
 void                makeEmpty(SbBool freeOld = TRUE)
 const char *        getString() const
 SbString            getSubString(int startChar, int endChar = -1) const
 void                deleteSubString(int startChar, int endChar = -1)
 SbString &          operator =(const char *str)
 SbString &          operator =(const SbString &str)
 SbString &          operator +=(const char *str)
 SbString &          operator +=(const SbString &str)
 int                 operator !() const
 int                 operator ==(const char *s, const SbString &str)
 int                 operator ==(const SbString &str, const char *s)
 int                 operator ==(const SbString &str1, const SbString
                          &str2)
 int                 operator !=(const char *s, const SbString &str)
 int                 operator !=(const SbString &str, const char *s)
 int                 operator !=(const SbString &str1, const SbString
                          &str2)

πŸ’œ DESCRIPTION πŸ’œ

Strings. But like… smart strings. 🧚✨ They come with a whole bunch of convenience methods that make string manipulation way easier, so you're not out here fighting raw char * like it's 1994. This is giving main character energy for text. πŸ‘‘


πŸ‘‘ METHODS πŸ‘‘

  • SbString()
  • SbString(const char *str)
  • SbString(const char *str, int start, int end)
  • SbString(const SbString &str)
  • SbString(int digitString)
  • ~SbString()

Constructors and destructor, bestie. 🫢 The constructors take a character string, or a subset of a character string from start to end (inclusive, okay, both ends, periodt), or an integer that gets turned into a string. So like, SbString(1234) creates the string "1234". And SbString("Testing",1,3) creates the string "est". Obsessed, honestly. πŸ”₯

  • uint32_t hash() β€” Returns a reasonable hash key for string. πŸ’…
  • int getLength() const β€” Returns length of string. That's it, that's the whole thing. πŸ“
  • void makeEmpty(SbBool freeOld = TRUE) β€” Sets string to be the empty string (""). If freeOld is TRUE (which is the default, fyi), any old storage is freed up. Let it go, babe. πŸ¦‹
  • const char * getString() const β€” Returns pointer to the character string. πŸ“Œ
  • SbString getSubString(int startChar, int endChar = -1) const β€” Returns a new string representing the sub-string from startChar to endChar, inclusive. If endChar is -1 (the default), the sub-string from startChar until the end is returned. Chef's kiss. 😘
  • void deleteSubString(int startChar, int endChar = -1) β€” Deletes the characters from startChar to endChar, inclusive, from the string. If endChar is -1 (the default), all characters from startChar until the end are deleted. Gone, reduced to atoms. πŸ’€
  • SbString & operator =(const char *str)
  • SbString & operator =(const SbString &str)

Assignment operators for character string, SbString. ✍️

  • SbString & operator +=(const char *str)
  • SbString & operator +=(const SbString &str)

Concatenation operators "+=" for string, SbString. Gluing vibes together. 🫢

  • int operator !() const β€” Unary "not" operator; returns TRUE if string is empty (""). πŸŒ™
  • int operator ==(const char *s, const SbString &str)
  • int operator ==(const SbString &str, const char *s)
  • int operator ==(const SbString &str1, const SbString &str2)

Equality operator for SbString/char* and SbString/SbString comparison. Are they the same? Say it back. πŸ’…

  • int operator !=(const char *s, const SbString &str)
  • int operator !=(const SbString &str, const char *s)
  • int operator !=(const SbString &str1, const SbString &str2)

Inequality operator for SbString/char* and SbString/SbString comparison. Not the same, and we're being normal about it. πŸ™ˆ


🌟 SEE ALSO 🌟

  • SbName β€” its sibling, go say hi πŸŽ€

And that's the whole page, bestie! This was SbString(3IV), the SbString manual page from the 3IV manual section β€” and that cute little SbString(3IV)() footer line at the bottom? That's just this same page signing off on itself, which is honestly such a Leo move. πŸ’…βœ¨ Anyway, go manipulate some strings. Slay. πŸ‘‘