Re: How to find the right function in the Phobos library?

2024-08-16 Thread Bruce via Digitalmars-d-learn
On Saturday, 17 August 2024 at 05:42:42 UTC, monkyyy wrote: On Saturday, 17 August 2024 at 05:28:37 UTC, Bruce wrote: It's the correct name for the wrong function Are you saying this is wrong? auto i = arr.countUntil("ha");

Re: create fixed length string of characters

2024-08-16 Thread Bruce via Digitalmars-d-learn
On Friday, 16 August 2024 at 11:37:08 UTC, Nick Treleaven wrote: ```d // use a fixed array: immutable char[60] a = '-'; string s = a.dup; // copy to heap, assuming you need the data to escape (use a[] otherwise) s.writeln(); This seems to work without having to make a string dup. I just w

each extern (C) keyword causes ld (OS X) to add a duplicate library entry

2015-02-19 Thread Ernest Bruce via Digitalmars-d-learn
Note the last two lines of this list (i am running OS X 10.10.2 and Xcode 6.1.1): clang -v -t cprog.c dprog.a -o cprog Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.1.0 Thread model: posix "/Applications/Xcode.app/Contents/Developer/Toolchains/Xco