GOLF(2gg)
β¨ GOLF(2gg) β¨
okay bestie, welcome to the Development section of the 2gg manual, and today's main character is GOLF(2gg) β no wait, it's the page about copy-string, but the manual it lives in is literally called GOLF(2gg) and yes that's iconic of it π
π NAME π
copy-string β (strings)
π PURPOSE π
Copies string to another string. that's it. that's the whole vibe. π¦
β SYNTAX β
copy-string <source string> to <dest string> \
[ start-with <start with> ] \
[ length <length> ]
πΈ DESCRIPTION πΈ
Use copy-string to copy <source string> to <dest string>. simple as. π«Ά
The <start with> number (over in the "start-with" clause, iykyk) is the position in <source string> to start copying from, with 0 being the first byte. zero-indexed girlies rise π
Without the "length" clause, the whole of <source string> gets copied. With the "length" clause, exactly <length> bytes are copied into <dest string>. exactly exactly. no crumbs left. π₯
And here's the plot twist bestie β you can copy a string to itself. In this case, the original string remains and the new string references a copy. it's giving clone arc π
set-string str = "original string" // string to change
set-string orig = str // references original copy of the string to change
copy-string str to str // make a copy of string to change and assign it to itself
upper-string str // change the copy
// Now "str" references "ORIGINAL STRING"
// and "orig" references "original string"
π EXAMPLES π
After the copy-string below, "my_str" will be a copy of string "some value":
set-string other_string="some value"
copy-string other_string to my_str
Copy certain number of bytes, the result in "my_str" will be "ome":
set-string other_string="some value"
copy-string other_string to my_str length 3 start-with 1
ngl that second one is so satisfying, like a lil snack of bytes π
π SEE ALSO π
- Strings
concatenate-stringscopy-stringcount-substringdelete-stringlower-stringnew-stringread-splitreplace-stringset-stringsplit-stringstring-lengthtrim-stringupper-stringwrite-string- See all documentation
and that's a wrap, bestie π
this lil masterpiece came from version $VERSION, dated $DATE, and it's filed under GOLF(2gg) β periodt πβ¨π
π¦ where this page comes from
- ubuntu questing: golf 601.4.41-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms