Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
21
Task/Metaprogramming/C/metaprogramming-5.c
Normal file
21
Task/Metaprogramming/C/metaprogramming-5.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#include <gadget/gadget.h>
|
||||
LIB_GADGET_START
|
||||
|
||||
Main
|
||||
String w, v="María tenía un corderito";
|
||||
|
||||
Stack{
|
||||
Store( v, Substr(v, Str_at("tenía",v),Str_len( Upper(v) )) );
|
||||
Store( v, Trim(Left( Upper(v), Str_at("CORDERITO",Upper(v))-1)));
|
||||
}Stack_off;
|
||||
|
||||
Print "msg stack : [%s]\n\n", v;
|
||||
|
||||
Let( v, "María tenía un corderito");
|
||||
|
||||
/* Str_len() sirve sin stack, pero en este caso es mejor usar strlen() de C. */
|
||||
w = Substr(v, Str_at("tenía",v),Str_len(v));
|
||||
Print "msg normal: %s\n", w;
|
||||
|
||||
Free secure w,v;
|
||||
End
|
||||
Loading…
Add table
Add a link
Reference in a new issue