-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84eee6f
commit 9d98619
Showing
6 changed files
with
58 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
use "std/internal/poll" | ||
use "std/io" | ||
use "std/jule/integrated" | ||
use "std/sys" | ||
|
||
// Seek whence values. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2024 The Jule Programming Language. | ||
// Use of this source code is governed by a BSD 3-Clause | ||
// license that can be found in the LICENSE file. | ||
|
||
use integ "std/jule/integrated" | ||
use "std/sys" | ||
|
||
// Retrieves the value of the environment variable named by the key. | ||
// If the variable is present in the environment the value (which may be empty) | ||
// is returned and the boolean is false. Otherwise the returned value will be | ||
// empty and the boolean will be true. | ||
fn LookupEnv(key: str): (val: str, unset: bool) { | ||
keyPtr := integ::StrToBytes(key) | ||
ret unsafe { sys::Getenv(&keyPtr[0]) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright 2024 The Jule Programming Language. | ||
// Use of this source code is governed by a BSD 3-Clause | ||
// license that can be found in the LICENSE file. | ||
|
||
use integ "std/jule/integrated" | ||
use "std/sys" | ||
|
||
// Retrieves the value of the environment variable named by the key. | ||
// If the variable is present in the environment the value (which may be empty) | ||
// is returned and the boolean is false. Otherwise the returned value will be | ||
// empty and the boolean will be true. | ||
fn LookupEnv(key: str): (val: str, unset: bool) { | ||
keyPtr := integ::UTF16FromStr(key) | ||
ret unsafe { sys::Getenv(&keyPtr[0]) } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters