egra: agg mini clipping bugfix; some fixes in widget rendering (buttons, etc.)
[iv.d.git] / libstrophe / utils.d
blob2faca7159554593118c5b8cea2d75ab543e5697a
1 /*
2 ** This software is provided AS-IS with no warranty, either express or
3 ** implied.
4 **
5 ** This software is dual licensed under the MIT and GPLv3 licenses.
6 */
7 module iv.libstrophe.utils /*is aliced*/;
8 import iv.alice;
11 // ////////////////////////////////////////////////////////////////////////// //
12 char* xmpp_toStrz (const(char)[] s) {
13 auto res = new char[](s.length+1);
14 res[] = 0;
15 res[0..s.length] = s[];
16 return res.ptr;
20 T[] xmpp_fromStrz(T : char) (T* s) {
21 if (s is null) return null;
22 usize pos = 0;
23 while (s[pos]) ++pos;
24 return s[0..pos];