1 /**********************************************************************************
5 **************************************************
6 * This code was created by Peter Harvey @ CodeByDesign.
7 * Released under LGPL 28.JAN.99
9 * Contributions from...
10 * -----------------------------------------------
11 * Peter Harvey - pharvey@codebydesign.com
12 **************************************************/
14 #include "inifile_intern.h"
16 #include <aros/libcall.h>
18 /*****************************************************************************
21 AROS_LH1(int, iniAllTrim
,
24 AROS_LHA(char *, pszString
, A0
),
27 struct Library
*, inifileBase
, 8, inifile
)
47 *****************************************************************************/
51 int nForwardCursor
= 0;
52 int nTrailingCursor
= 0;
56 for ( nForwardCursor
=0; pszString
[nForwardCursor
] != '\0'; nForwardCursor
++ )
58 if ( bTrim
&& isspace( pszString
[nForwardCursor
] ) )
65 pszString
[nTrailingCursor
] = pszString
[nForwardCursor
];
69 pszString
[nTrailingCursor
] = '\0';
72 for ( nForwardCursor
=strlen(pszString
)-1;
73 nForwardCursor
>= 0 && isspace( pszString
[nForwardCursor
] );
77 pszString
[nForwardCursor
+1] = '\0';