Re: Check whether string value represents a type

2017-07-24 Thread Timoses via Digitalmars-d-learn
On Monday, 24 July 2017 at 07:08:56 UTC, Basile B. wrote: On Friday, 21 July 2017 at 14:21:37 UTC, Timoses wrote: I'd love to check whether a string value is the name of a type at run-time. [...] The goal is to identify whether a string represents a custom type within a package. I'm also

Re: Check whether string value represents a type

2017-07-24 Thread Basile B. via Digitalmars-d-learn
On Friday, 21 July 2017 at 14:21:37 UTC, Timoses wrote: I'd love to check whether a string value is the name of a type at run-time. [...] The goal is to identify whether a string represents a custom type within a package. I'm also trying to iterate over all modules within the package to get

Re: Check whether string value represents a type

2017-07-24 Thread Timoses via Digitalmars-d-learn
On Friday, 21 July 2017 at 14:44:23 UTC, Steven Schveighoffer wrote: On 7/21/17 10:21 AM, Timoses wrote: I'd love to check whether a string value is the name of a type at run-time. E.g.: string a = "int"; string b = "im no type"; assert( isStringType(a) ); assert( !isStringType(b) ); or

Re: Check whether string value represents a type

2017-07-21 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/21/17 10:21 AM, Timoses wrote: I'd love to check whether a string value is the name of a type at run-time. E.g.: string a = "int"; string b = "im no type"; assert( isStringType(a) ); assert( !isStringType(b) ); or struct TestStruct { int test; } string t = "TestStruct"; assert(

Check whether string value represents a type

2017-07-21 Thread Timoses via Digitalmars-d-learn
I'd love to check whether a string value is the name of a type at run-time. E.g.: string a = "int"; string b = "im no type"; assert( isStringType(a) ); assert( !isStringType(b) ); or struct TestStruct { int test; } string t = "TestStruct"; assert( isStringType(t) ); Is anything like