Update RingRayLib - raylib.c - Add Function : const char *TextSubtext(const char *text, int position, int length)
@@ -4362,6 +4362,28 @@ RING_FUNC(ring_TextFormat)
RING_API_RETSTRING(TextFormat(RING_API_GETSTRING(1)));
}
+
+RING_FUNC(ring_TextSubtext)
+{
+ if ( RING_API_PARACOUNT != 3 ) {
+ RING_API_ERROR(RING_API_MISS3PARA);
+ return ;
+ }
+ if ( ! RING_API_ISSTRING(1) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(2) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ if ( ! RING_API_ISNUMBER(3) ) {
+ RING_API_ERROR(RING_API_BADPARATYPE);
+ return ;
+ }
+ RING_API_RETSTRING(TextSubtext(RING_API_GETSTRING(1), (int ) RING_API_GETNUMBER(2), (int ) RING_API_GETNUMBER(3)));
+}
+
RING_API void ringlib_init(RingState *pRingState)
{
ring_vm_funcregister("initwindow",ring_InitWindow);
@@ -4613,4 +4635,5 @@ RING_API void ringlib_init(RingState *pRingState)
ring_vm_funcregister("textlength",ring_TextLength);
ring_vm_funcregister("textcountcodepoints",ring_TextCountCodepoints);
ring_vm_funcregister("textformat",ring_TextFormat);
+ ring_vm_funcregister("textsubtext",ring_TextSubtext);
}
