Jump to content

Copy a string: Difference between revisions

m
m (sntax highlighting fixup automation)
Line 750:
return 0;
}</syntaxhighlight>
 
<pre>
Versión 2, using Gadget library</pre>
 
<syntaxhighlight lang="c">
 
#include <gadget/gadget.h>
 
LIB_GADGET_START
 
Main
String v, w = "this message is a message";
Let( v, "Hello world!");
Print "v = %s\nw = %s\n\n", v,w;
Get_fn_let( v, Upper(w) );
Print "v = %s\nw = %s\n\n", v,w;
 
Stack{
Store ( v, Str_tran_last( Upper(w), "MESSAGE", "PROOF" ) );
}Stack_off;
Print "v = %s\nw = %s\n\n", v,w;
Free secure v, w;
 
End
</syntaxhighlight>
{{out}}
v = Hello world!
w = this message is a message
 
v = THIS MESSAGE IS A MESSAGE
w = this message is a message
 
v = THIS MESSAGE IS A PROOF
w = this message is a message
 
=={{header|C sharp|C#}}==
545

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.