Difference between revisions of "Talk:Set length"
Jump to navigation
Jump to search
imported>StDoodle (Created page with 'I assume a buffer set to a longer length than what it currently contains will have blank spaces appended, but I'm not really that up on buffers. Clarify? --~~~~') |
imported>Bale |
||
Line 1: | Line 1: | ||
I assume a buffer set to a longer length than what it currently contains will have blank spaces appended, but I'm not really that up on buffers. Clarify? --[[User:StDoodle|StDoodle (#1059825)]] 15:50, 6 May 2010 (UTC) | I assume a buffer set to a longer length than what it currently contains will have blank spaces appended, but I'm not really that up on buffers. Clarify? --[[User:StDoodle|StDoodle (#1059825)]] 15:50, 6 May 2010 (UTC) | ||
+ | |||
+ | {{ | ||
+ | CodeSample| | ||
+ | code= | ||
+ | <syntaxhighlight> | ||
+ | > ash buffer tester; tester.append("hello world"); tester.set_length(10);tester.append("*"); print(tester) | ||
+ | |||
+ | hello worl* | ||
+ | Returned: void | ||
+ | |||
+ | > ash buffer tester; tester.append("hello world"); tester.set_length(20);tester.append("*"); print(tester) | ||
+ | |||
+ | hello world * | ||
+ | Returned: void | ||
+ | </syntaxhighlight>}} | ||
+ | |||
+ | That's what my CLI looks like right now, but something is weird. I'm going to have to ask a question on the forum. http://kolmafia.us/showthread.php?2467-7579-Add-void-set_length(-buffer-int-)-function-to-ASH-to-...&p=29275#post29275 --[[User:Bale|Bale]] 21:24, 6 May 2010 (UTC) |
Latest revision as of 21:24, 6 May 2010
I assume a buffer set to a longer length than what it currently contains will have blank spaces appended, but I'm not really that up on buffers. Clarify? --StDoodle (#1059825) 15:50, 6 May 2010 (UTC)
> ash buffer tester; tester.append("hello world"); tester.set_length(10);tester.append("*"); print(tester)
hello worl*
Returned: void
> ash buffer tester; tester.append("hello world"); tester.set_length(20);tester.append("*"); print(tester)
hello world *
Returned: void
That's what my CLI looks like right now, but something is weird. I'm going to have to ask a question on the forum. http://kolmafia.us/showthread.php?2467-7579-Add-void-set_length(-buffer-int-)-function-to-ASH-to-...&p=29275#post29275 --Bale 21:24, 6 May 2010 (UTC)