Fixing example code

This commit is contained in:
Andrey Breslav
2011-11-12 20:31:06 +04:00
parent c74a0a62cc
commit 2070c2201e
2 changed files with 1 additions and 2 deletions
+1 -1
View File
@@ -56,6 +56,6 @@ namespace io {
namespace string {
fun String.replaceAll(pattern : String, replacement : String) : String {
return java.util.regex.Pattern.compile(pattern).matcher(this).replaceAll(replacement).npe()
return (this as java.lang.String).replace(pattern as CharSequence, replacement as CharSequence).npe()
}
}
@@ -15,5 +15,4 @@ fun main(args : Array<String>) {
// Note: \u000A is Unicode representation of linefeed (LF)
val c : Char = 0x000A .chr;
println(c);
println("a\u \u0 \u00 \u000 \u0000 \u0AaA \u0AAz.length( ) + \u0022b")
}