We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a86d51 commit 0455f37Copy full SHA for 0455f37
src/Str/StrBuffer.php
@@ -111,9 +111,11 @@ public function reset(): void
111
}
112
113
/**
114
- * clear data
+ * Get and clear data
115
+ *
116
+ * @return string
117
*/
- public function clear(): string
118
+ public function getAndClear(): string
119
{
120
$strings = $this->parts;
121
// clear
@@ -122,6 +124,14 @@ public function clear(): string
122
124
return implode($strings);
123
125
126
127
+ /**
128
+ * clear data
129
+ */
130
+ public function clear(): string
131
+ {
132
+ return $this->getAndClear();
133
+ }
134
+
135
136
* @return string[]
137
0 commit comments