comparison d2/qtd/String.d @ 366:da4235301224

Fixed VoidFunc. Updated to dmd.2.047.
author Max Samukha <maxter@spambox.com>
date Wed, 23 Jun 2010 21:34:43 +0300
parents 9784459f0750
children 185df9220ea7
comparison
equal deleted inserted replaced
365:958e8b9a89bd 366:da4235301224
73 q{ 73 q{
74 *str = toUTF8(arr[0..size]); 74 *str = toUTF8(arr[0..size]);
75 })); 75 }));
76 76
77 77
78 // to work around the standard startsWith not being runnable at compile time.
79 size_t startsWith(string s, string pattern)
80 {
81 if (pattern.length <= s.length && s[0..pattern.length] == pattern)
82 return pattern.length;
83 return 0;
84 }
78 85
79 86
87
88
89
90