-WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
-woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
-.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
235
13
110
-WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
-woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
-.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
235
13
110
-WOE TO YOU, OH EARTH AND SEA FOR THE DEVIL SENDS THE BEAST WITH WRATH BECAUSE HE KNOWS THE TIME IS SHORT. LET HIM WHO HATH UNDERSTANDING RECKON THE NUMBER OF THE BEAST, FOR IT IS A HUMAN NUMBER, ITS NUMBER IS SIX HUNDRED AND SIXTY-SIX.
-woe to you, oh earth and sea for the devil sends the beast with wrath because he knows the time is short. let him who hath understanding reckon the number of the beast, for it is a human number, its number is six hundred and sixty-six.
Woe to you, oh earth and sea for the Devil sends the beast with wrath because he knows the time is short.
Let him who hath understanding reckon the number of the beast, for it is a human number, its number is Six Hundred and Sixty-Six.
-.xiS-ytxiS dna derdnuH xiS si rebmun sti ,rebmun namuh a si ti rof ,tsaeb eht fo rebmun eht nokcer gnidnatsrednu htah ohw mih teL .trohs si emit eht swonk eh esuaceb htarw htiw tsaeb eht sdnes liveD eht rof aes dna htrae ho ,uoy ot eoW
235
13
110
print st
-var pr = st.prepend("The ")
+var pr = "The " + st
print pr
print pr
-pr = st.append(".")
+pr = st + "."
print pr
-print st.insert_at(" jumps", 15). prepend("The ").append(".")
+print "The " + st.insert_at(" jumps", 15) + "."
var y = "string" + "__" + "NativeString" + "__" + "to_s_with_length"
-var z = new FlatBuffer.from("string") + "__" + "NativeString" + "__" + "to_s_with_length"
+var z = new FlatBuffer.from("string")
+z.append("__")
+z.append("NativeString")
+z.append("__")
+z.append("to_s_with_length")
var a = ["string", "NativeString", "to_s_with_length"].join("__")
var atb = new Array[String]
-var s = new RopeString
-s = s.prepend(".types").as(RopeString)
-s = s.prepend("./examples/hello_world.nit".substring(11,11)).as(RopeString)
-s = s.append(".").as(RopeString)
-s = s.append("1").as(RopeString)
-s = s.append(".o").as(RopeString)
+var s: String = new RopeString
+s = s + "./examples/hello_world.nit".substring(11,11) + ".types"
+s += "."
+s += "1"
+s += ".o"
print s
# Test Text methods on all types of receivers
-print txt.to_upper
-print txt.to_lower
-assert txt * 2 == txt + txt
print txt.substring(0, 105)
print txt.substring_from(106)
-print txt.reversed
print txt.length
assert not txt.is_empty
print txt.index_of('h')
var chars = txt.chars
assert chars != txt.substring_from(106).chars
-assert (txt.substring(0,105) + txt.substring_from(105)).chars == txt.chars
assert chars[0] == 'W'
assert chars.count('o') == 11
assert chars.first == chars[0]
x = "test"
y = "TEST"
-#alt1 x = new FlatBuffer.from("test")
-#alt1 y = new FlatBuffer.from("TEST")
-
assert x.to_upper == y
assert y.to_lower == x
--- /dev/null
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+var x = new FlatBuffer.from("test")
+var y = new FlatBuffer.from("TEST")
+
+x.upper
+y.lower
+
+assert x == "TEST"
+assert y == "test"
+