Warning

You're browsing the old v2.x documentation. This version is no longer maintained. Click here to go the v3.x documentation.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
strncpy [2019/05/23 08:32] neilsstrncpy [2019/05/23 08:32] neils
Line 16: Line 16:
   rem -- the above will output "hello"   rem -- the above will output "hello"
      
-''STRNCPY'' can be used to emulate the CBM BASIC functions ''LEFT$'' and ''MID$''. The example above shows hoe to get the first n characters of a string. Here is an example for getting the middle of a string:+''STRNCPY'' can be used to emulate the CBM BASIC functions ''LEFT$'' and ''MID$''. The example above shows how to get the first n characters of a string. Here is an example for getting the middle of a string:
  
 **CBM BASIC** code: **CBM BASIC** code: