summaryrefslogtreecommitdiff
path: root/doc/string/ord.rdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/string/ord.rdoc')
-rw-r--r--doc/string/ord.rdoc7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/string/ord.rdoc b/doc/string/ord.rdoc
new file mode 100644
index 0000000000..8c460d3ba4
--- /dev/null
+++ b/doc/string/ord.rdoc
@@ -0,0 +1,7 @@
+Returns the integer ordinal of the first character of +self+:
+
+ 'h'.ord # => 104
+ 'hello'.ord # => 104
+ 'こんにちは'.ord # => 12371
+
+Related: see {Converting to Non-String}[rdoc-ref:String@Converting+to+Non-String].