diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-03-06 16:01:26 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-03-06 16:01:26 -0500 |
| commit | 0e5b48d1a2cd5bcd22be4f4e14c80c3335f70985 (patch) | |
| tree | 2c5adff99ad0a96838d94bd35b653fea8aaae1d6 /doc | |
| parent | 3dc8cb12e81dde268f558de1cf2c3d288bd1939f (diff) | |
| download | zig-0e5b48d1a2cd5bcd22be4f4e14c80c3335f70985.tar.gz zig-0e5b48d1a2cd5bcd22be4f4e14c80c3335f70985.zip | |
fix `@embedFile` docs
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.html.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/doc/langref.html.in b/doc/langref.html.in index 50058dbd46..447d545975 100644 --- a/doc/langref.html.in +++ b/doc/langref.html.in @@ -7281,11 +7281,13 @@ test "main" { {#see_also|@divFloor|@divExact#} {#header_close#} {#header_open|@embedFile#} - <pre>{#syntax#}@embedFile(comptime path: []const u8) [X]u8{#endsyntax#}</pre> + <pre>{#syntax#}@embedFile(comptime path: []const u8) *const [X:0]u8{#endsyntax#}</pre> <p> - This function returns a compile time constant fixed-size array with length - equal to the byte count of the file given by {#syntax#}path{#endsyntax#}. The contents of the array - are the contents of the file. + This function returns a compile time constant pointer to null-terminated, + fixed-size array with length equal to the byte count of the file given by + {#syntax#}path{#endsyntax#}. The contents of the array are the contents of the file. + This is equivalent to a {#link|string literal|String Literals and Character Literals#} + with the file contents. </p> <p> {#syntax#}path{#endsyntax#} is absolute or relative to the current file, just like {#syntax#}@import{#endsyntax#}. |
