On 16-Aug-11 10:22 AM, Jonathan M Davis wrote:
On Monday, August 15, 2011 14:28 Jonathan M Davis wrote:
On Monday, August 15, 2011 02:25 Joel Christensen wrote:
Ok, this is a good one I think.
import std.string, std.algorithm, std.functional;
bool isANum( dchar chr ) {
return inPattern( chr,
On Monday, August 15, 2011 14:28 Jonathan M Davis wrote:
> On Monday, August 15, 2011 02:25 Joel Christensen wrote:
> > Ok, this is a good one I think.
> >
> > import std.string, std.algorithm, std.functional;
> >
> > bool isANum( dchar chr ) {
> > return inPattern( chr, digits ~ `"+-.` );
> > }
On Monday, August 15, 2011 02:25 Joel Christensen wrote:
> Ok, this is a good one I think.
>
> import std.string, std.algorithm, std.functional;
>
> bool isANum( dchar chr ) {
> return inPattern( chr, digits ~ `"+-.` );
> }
>
> void main() {
> auto input = `abc123`;
> auto indexEnd = -1;
>
> in
Ok, this is a good one I think.
import std.string, std.algorithm, std.functional;
bool isANum( dchar chr ) {
return inPattern( chr, digits ~ `"+-.` );
}
void main() {
auto input = `abc123`;
auto indexEnd = -1;
indexEnd = count!( not!isANum )( input );
assert( indexEnd =
On 15-Aug-11 5:21 PM, Joel Christensen wrote:
On 15-Aug-11 2:55 PM, Jonathan M Davis wrote:
On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
Hi,
This program loops through a string until it finds a number and gives
the position of it.
The first assert works, but not the second one.
On 15-Aug-11 2:55 PM, Jonathan M Davis wrote:
On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
Hi,
This program loops through a string until it finds a number and gives
the position of it.
The first assert works, but not the second one.
import std.algorithm;
void main() {
On 14-Aug-11 10:44 PM, Jonathan M Davis wrote:
On Sunday, August 14, 2011 03:23:39 Jonathan M Davis wrote:
On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
Hi,
This program loops through a string until it finds a number and gives
the position of it.
The first assert works, but not
On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
> Hi,
>
> This program loops through a string until it finds a number and gives
> the position of it.
>
> The first assert works, but not the second one.
>
> import std.algorithm;
>
> void main() {
> static bool isNumber( char in
On Sunday, August 14, 2011 03:23:39 Jonathan M Davis wrote:
> On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
> > Hi,
> >
> > This program loops through a string until it finds a number and gives
> > the position of it.
> >
> > The first assert works, but not the second one.
> >
> >
On Sunday, August 14, 2011 03:23:39 Jonathan M Davis wrote:
> On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
> > Hi,
> >
> > This program loops through a string until it finds a number and gives
> > the position of it.
> >
> > The first assert works, but not the second one.
> >
> >
On Sunday, August 14, 2011 20:50:03 Joel Christensen wrote:
> Hi,
>
> This program loops through a string until it finds a number and gives
> the position of it.
>
> The first assert works, but not the second one.
>
> import std.algorithm;
>
> void main() {
> static bool isNumber( char in
11 matches
Mail list logo