Skip to content

Commit

Permalink
增加最后更新时间和edit按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Sep 20, 2023
1 parent 146e6cd commit bd88d97
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions learn/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ export default defineConfig({
lang: "zh-CN",
title: "Learn Zig",
description: "简单、快速地学习 Zig",
sitemap: {
hostname: "https://learnzig.nvimer.org/",
},
lastUpdated: true,
themeConfig: {
editLink: {
pattern: "https://github.com/learnzig/learnzig/tree/main/learn/:path",
},
search: {
provider: "local",
// options: {
Expand Down
4 changes: 2 additions & 2 deletions learn/basic/advanced_type/silce.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ outline: deep

切片和数组看起来上很像,在实际使用时,你可能会想要使用切片,因为它相对数组来说,要更加灵活!

*你可以对数组、切片、数组指针进行切片操作!*
_你可以对数组、切片、数组指针进行切片操作!_

接下来我们演示以下切片的使用方式:

Expand Down Expand Up @@ -45,7 +45,7 @@ slice 类型为*[4]i32

注意,这里说的是边界值有一个是变量(运行时可知),如果两个边界值均是编译期可知的话,编译器会直接将切片优化为数组指针。

:::info 🅿️ 提示
:::info 🅿️ 提示

切片的本质:它本质是一个胖指针,包含了一个 指针类型 `[*]T` 和 长度。

Expand Down

0 comments on commit bd88d97

Please sign in to comment.