aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/string.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2012-01-31 15:46:47 +0100
committerHans Bolinder <[email protected]>2012-01-31 15:46:47 +0100
commit0c03cc0b8df68f1531947e0c117e9606ad3daf08 (patch)
tree21276fdb89ee105def771732262c344e4ade78f6 /lib/stdlib/src/string.erl
parent8c9975b642c3f3eb76eaa5ea5964226ac1e4600b (diff)
parent037150979ff809df85757bd2b3f676e2e4c6be88 (diff)
downloadotp-0c03cc0b8df68f1531947e0c117e9606ad3daf08.tar.gz
otp-0c03cc0b8df68f1531947e0c117e9606ad3daf08.tar.bz2
otp-0c03cc0b8df68f1531947e0c117e9606ad3daf08.zip
Merge branch 'hb/bif_specs/OTP-9862'
* hb/bif_specs/OTP-9862: Move types and specs from erl_bif_types.erl to modules
Diffstat (limited to 'lib/stdlib/src/string.erl')
-rw-r--r--lib/stdlib/src/string.erl26
1 files changed, 25 insertions, 1 deletions
diff --git a/lib/stdlib/src/string.erl b/lib/stdlib/src/string.erl
index 30eac4f07d..fc029a582f 100644
--- a/lib/stdlib/src/string.erl
+++ b/lib/stdlib/src/string.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -29,6 +29,30 @@
%%---------------------------------------------------------------------------
+%%% BIFs
+
+-export([to_float/1, to_integer/1]).
+
+-spec to_float(String) -> {Float, Rest} | {error, Reason} when
+ String :: string(),
+ Float :: float(),
+ Rest :: string(),
+ Reason :: no_float | not_a_list.
+
+to_float(_) ->
+ erlang:nif_error(undef).
+
+-spec to_integer(String) -> {Int, Rest} | {error, Reason} when
+ String :: string(),
+ Int :: integer(),
+ Rest :: string(),
+ Reason :: no_integer | not_a_list.
+
+to_integer(_) ->
+ erlang:nif_error(undef).
+
+%%% End of BIFs
+
%% Robert's bit
%% len(String)