aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-04-08 17:45:22 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-04-08 17:45:22 -0400
commit095591f0b0f0d09bb1589fc404c2e7fdeac4bee4 (patch)
treed98a149b0a2472bdaef45b15bdcd42e4d6a42566 /doc
parent7611ed3484ad810fe10d3c303a04d66bfa0bd6fd (diff)
downloadzig-095591f0b0f0d09bb1589fc404c2e7fdeac4bee4.tar.gz
zig-095591f0b0f0d09bb1589fc404c2e7fdeac4bee4.zip
add enumTagName builtin function
closes #299
Diffstat (limited to 'doc')
-rw-r--r--doc/langref.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/langref.md b/doc/langref.md
index 1849ef0351..c53d3f8fc2 100644
--- a/doc/langref.md
+++ b/doc/langref.md
@@ -625,3 +625,7 @@ Converts a pointer of one type to a pointer of another type.
### @intToPtr(comptime DestType: type, int: usize) -> DestType
Converts an integer to a pointer. To convert the other way, use `usize(ptr)`.
+
+### @enumTagName(value: var) -> []const u8
+
+Converts an enum tag name to a slice of bytes. Example: