FreeBASIC
0.91.0
Main Page
Data Structures
Files
File List
Globals
strw_ltrim.c
Go to the documentation of this file.
1
/* ltrimw$ function */
2
3
#include "
fb.h
"
4
5
FBCALL
FB_WCHAR
*
fb_WstrLTrim
(
const
FB_WCHAR
*src )
6
{
7
FB_WCHAR
*dst;
8
const
FB_WCHAR
*
p
;
9
ssize_t len;
10
11
if
( src ==
NULL
)
12
return
NULL
;
13
14
len =
fb_wstr_Len
( src );
15
p =
fb_wstr_SkipChar
( src, len,
_LC
(
' '
) );
16
17
len -=
fb_wstr_CalcDiff
( src, p );
18
if
( len <= 0 )
19
return
NULL
;
20
21
/* alloc temp string */
22
dst =
fb_wstr_AllocTemp
( len );
23
if
( dst !=
NULL
)
24
fb_wstr_Copy
( dst, p, len );
25
26
return
dst;
27
}
rtlib
strw_ltrim.c
Generated on Thu Jan 23 2014 19:40:13 for FreeBASIC by
1.8.4