module array_to_s_buffer
intrude import standard::collection::array
-import standard::string
+import standard::text
redef class Array[E]
redef fun to_s: String do
# To be used as a Mixin at compile-time for benchmarking purposes.
module array_to_s_flatstr
-intrude import standard::string
+intrude import standard::text::flat
redef class FlatString
redef fun +(o) do
module array_to_s_man_buf
intrude import standard::collection::array
-import standard::string
+import standard::text
redef class Array[E]
redef fun to_s: String do
# To be used as a Mixin at compile-time for benchmarking purposes.
module array_to_s_manual
-intrude import standard::string
+intrude import standard::text::flat
intrude import standard::collection::array
redef class NativeArray[E]
module array_to_s_rope
intrude import standard::collection::array
-intrude import standard::ropes
+intrude import standard::text::ropes
redef class Array[E]
module array_to_s_rope_buf
intrude import standard::collection::array
-import standard::ropes
+import standard::text::ropes
redef class Array[E]
redef fun to_s: String do
# Benches measuring the performance of several concatenations on Text variants
module chain_concat
-intrude import standard::ropes
+intrude import standard::text::ropes
import opts
redef class FlatString
module iteration_bench
import opts
-intrude import standard::ropes
+intrude import standard::text::ropes
redef class Concat
redef fun +(o) do
module substr_bench
import opts
-intrude import standard::ropes
+intrude import standard::text::ropes
fun bench_flatstr(nb_cct: Int, loops: Int, strlen: Int)
do
# and reallocations when concatenating `String` objects.
module buffered_ropes
-intrude import standard::ropes
+intrude import standard::text::ropes
# Hidden buffer, used to simulate a `FlatBuffer` on a short string.
#
end
import c
-intrude import standard::string
+intrude import standard::text::flat
import serialization
private import json::serialization
module ropes_debug
import standard
-intrude import standard::ropes
+intrude import standard::text::ropes
redef class Text
# Writes self as a dot file on the hard drive
# See the License for the specific language governing permissions and
# limitations under the License.
-import string
+import text
class Test end
class MyArray[E] end
# See the License for the specific language governing permissions and
# limitations under the License.
-import string
+import text
redef class String
redef fun output
# See the License for the specific language governing permissions and
# limitations under the License.
-import string
+import text
'c'.to_s.output
'\n'.output
# See the License for the specific language governing permissions and
# limitations under the License.
-intrude import string
+intrude import text::flat
# Check Bool.object_id
assert true.object_id.to_s.is_numeric
# limitations under the License.
#alt1 import standard
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
var n = 4
if not args.is_empty then
# limitations under the License.
#alt1 import standard
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
# A procedural program (without explicit class).
# It exhibs ways to concatenate strings.
#alt1 import standard
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
var a = 10
# First way: Multiple parameters.
module test_mod2 # second comment
import standard::kernel
-#import standard::string
+#import standard::text
import template # no need for string
# import standard
import end
intrude import standard::kernel
-private import standard::string
+private import standard::text
`{`}
module test_mod2 # second comment
import standard::kernel
-#import standard::string
+#import standard::text
import template # no need for string
# import standard
\ No newline at end of file
import end
intrude import standard::kernel
-private import standard::string
+private import standard::text
`{`}
-Error: other error
-Warning: some warning
0
+Error: bla bla
\ No newline at end of file
module string_ffi_ref_test
-intrude import string
+intrude import text::flat
import file
class StringTest
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
#alt1 import standard
var trimtest = " \t nono nono \n \t"
# limitations under the License.
import standard
-intrude import standard::ropes
+intrude import standard::text::ropes
var rp: String = new Concat("xxx", "yyy")
rp += "zzz"
# Test callback to an extern constructor from extern code
-import standard::string
+import standard::text
extern class IntPtr `{ int* `}
new (v: Int) `{
import end
intrude import standard::kernel
-private import standard::string
+private import standard::text
`{`}
module test_mod2 # second comment
import standard::kernel
-#import standard::string
+#import standard::text
import template # no need for string
# import standard
# limitations under the License.
import standard
-intrude import standard::ropes
+intrude import standard::text::ropes
# Force building a Rope
redef fun maxlen: Int do return once 2
module test_ropes_buffer_add_overflow
import standard
-intrude import ropes
+intrude import standard::text::ropes
var buffer = new RopeBuffer
# limitations under the License.
#alt1 import standard
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
var s = "Bonjour !\n"
var r: Buffer = new FlatBuffer.with_capacity(50)
# See the License for the specific language governing permissions and
# limitations under the License.
-#alt1 import standard::ropes
+#alt1 import standard::text::ropes
var x: Buffer = new FlatBuffer.from("test")
#alt1 x = new RopeBuffer.from("test")
# See the License for the specific language governing permissions and
# limitations under the License.
-import string
+import text
0.output
"Error: bla bla".output
# See the License for the specific language governing permissions and
# limitations under the License.
-import string
+import text
"NOT YET IMPLEMENTED".output