Skip to content

Commit

Permalink
added remove_first_and_last_char(string) => string
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@1777 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
x02lucpo committed May 10, 2005
1 parent acf8f26 commit c68f68b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions modeq/winruntime/systemimpl.c
Expand Up @@ -152,6 +152,27 @@ RML_BEGIN_LABEL(System__toupper)
}
RML_END_LABEL

RML_BEGIN_LABEL(System__remove_5ffirst_5fand_5flast_5fchar)
{
char *str = RML_STRINGDATA(rmlA0);
char *res = "";
int length=strlen(str);
int i;
if(length > 1)
{
res=malloc(length-2);
for(i = 1; i < length - 1; ++i)
res[i-1] = str[i];
res[length-2] = '\0';
}
rmlA0 = (void*) mk_scon(res);
/* adrpo added 2004-10-29 */
free(res);

RML_TAILCALLK(rmlSC);
}
RML_END_LABEL

RML_BEGIN_LABEL(System__strcmp)
{
char *str = RML_STRINGDATA(rmlA0);
Expand Down

0 comments on commit c68f68b

Please sign in to comment.