Pelles C forum

C language => Tips & tricks => Topic started by: kingboyD on January 01, 2011, 08:08:16 pm

Title: BASIC String functions
Post by: kingboyD on January 01, 2011, 08:08:16 pm
Functions as used in BASIC language:

left()        # return the leftmost N characters from a string, equivalent to LEFT$
right()      # return the rightmost N characters from a string, equivalent to RIGHT$
mid()        # return a substring, N characters long beginning at position M, equivalent to MID$
string()     # create a string of repeated characters, equivalent to STRING$()
trim()       # remove leading, trailing, & excess embedded spaces
Title: Re: BASIC String functions
Post by: David L Morris on January 03, 2011, 08:50:40 am
Thanks for this posting.  I am enjoying testing these routines.  They will be a great help for BASIC programmers who want to explore the C language.