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