Update RingRayLib - raylib.c - Add Function : int TextToInteger(const char *text)
@@ -4554,6 +4554,20 @@ RING_FUNC(ring_TextToPascal)
RING_API_RETSTRING(TextToPascal(RING_API_GETSTRING(1)));
}
+
+RING_FUNC(ring_TextToInteger)
+{
+ if ( RING_API_PARACOUNT != 1 ) {
+ RING_API_ERROR(RING_API_MISS1PARA);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETNUMBER(TextToInteger(RING_API_GETSTRING(1)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -4815,4 +4829,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("texttoupper",ring_TextToUpper);
ring_vm_funcregister("texttolower",ring_TextToLower);
ring_vm_funcregister("texttopascal",ring_TextToPascal);
+ ring_vm_funcregister("texttointeger",ring_TextToInteger);
}
