# text2path proc

Source: https://ref.dm-lang.org/proc/text2path

### Format
> `text2path(T)`

### Args
> T: A text string.

### Returns
> a type path or null.

```dm /text2path/
var/myturf = text2path("/turf/[src.color]")
if(myturf)
  src.loc = locate(myturf)
```

T is changed from a text string to the equivalent type path, or null if there is no such type.

### See also
> [ispath proc](https://ref.dm-lang.org/proc/ispath.md)
