mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-24 04:46:05 +08:00
[Benchmark] add encoding for CRuby 1.9
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_chomp(x)
|
||||
multiple_eol = "The quick brown fox jumps over the lazy dog.\r\n\r\n\n\n\r\n"
|
||||
no_eol = "The quick brown fox jumps over the lazy dog."
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_concat(x)
|
||||
ascii = "hello"
|
||||
utf8 = "こんにちは"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_dup(x)
|
||||
ascii = "The quick brown fox jumps over the lazy dog."
|
||||
utf8 = "飛べねぇ豚はタダの豚だ...................."
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_equal(x)
|
||||
string_a = "#{'a' * 1_001}"
|
||||
first_char_different = "b#{'a' * 1_000}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_include(x)
|
||||
x.report "include? with ASCII match" do
|
||||
100000.times do
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_index(x)
|
||||
string = "the"
|
||||
string_utf8 = "そして"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_new(x)
|
||||
ascii = "The quick brown fox jumps over the lazy dog."
|
||||
utf8 = "飛べねぇ豚はタダの豚だ...................."
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
def string_slice(x)
|
||||
range = 34..40
|
||||
regexp = /[aeiou](.)\1/
|
||||
|
||||
Reference in New Issue
Block a user