shell stuff, preprocessor directive
This commit is contained in:
@@ -5,6 +5,7 @@ first
|
||||
join
|
||||
nibble
|
||||
split
|
||||
str_to_lower
|
||||
str_to_upper
|
||||
replace
|
||||
to_lower
|
||||
to_upper
|
||||
trim
|
||||
|
||||
+11
-3
@@ -43,18 +43,26 @@ RENDER()
|
||||
for(auto file_name : ls("pages/"))
|
||||
{
|
||||
String ft = nibble(file_name, ".");
|
||||
if(ft[1] == '_')
|
||||
if(ft.substr(0, 2) == "0_")
|
||||
{
|
||||
String fn = ft;
|
||||
String pre = nibble(fn, "_");
|
||||
?>
|
||||
<div><a href="?p=<?= ft ?>"><?= fn ?></a><span style="opacity:0.5"> : struct</span></div>
|
||||
<div><a href="?p=<?= uri_encode(ft) ?>"><?= fn ?></a><span style="opacity:0.5"> : struct</span></div>
|
||||
<?
|
||||
}
|
||||
else if(ft.substr(0, 2) == "1_")
|
||||
{
|
||||
String fn = ft;
|
||||
String pre = nibble(fn, "_");
|
||||
?>
|
||||
<div><a href="?p=<?= uri_encode(ft) ?>"><?= fn ?></a><span style="opacity:0.5"> : directive</span></div>
|
||||
<?
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<div><a href="?p=<?= ft ?>"><?= ft ?><span style="opacity:0.5">()</span></a></div>
|
||||
<div><a href="?p=<?= uri_encode(ft) ?>"><?= ft ?><span style="opacity:0.5">()</span></a></div>
|
||||
<?
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
:sig
|
||||
#load "myfile.uce"
|
||||
|
||||
:params
|
||||
file name : name of an UCE file that should be included
|
||||
|
||||
:desc
|
||||
Includes another UCE file
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
:sig
|
||||
String replace(String s, String search, String replace_with)
|
||||
|
||||
:params
|
||||
s : the string where replacements should happen
|
||||
search : the string that should be searched for
|
||||
replace_with : the string that should appear in places where 'search' occurs
|
||||
return value : a version of 's' where all instances of 'search' have been replaced with 'replace_with'
|
||||
|
||||
:desc
|
||||
Replace all occurrences of 'search' with the string defined in 'replace_with'.
|
||||
|
||||
:see
|
||||
>string
|
||||
+4
-2
@@ -1,9 +1,11 @@
|
||||
:sig
|
||||
StringList split(String str, String delim = "\n")
|
||||
StringList split(String str, String delim)
|
||||
StringList split(String str)
|
||||
|
||||
|
||||
:params
|
||||
str : string to be split
|
||||
delim : delimiter (defaults to newline character)
|
||||
delim : optional, delimiter (if omitted, any sequence of whitespace characters will count as a delimiter)
|
||||
return value : a list of strings
|
||||
|
||||
:desc
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
String str_to_lower(String s)
|
||||
String to_lower(String s)
|
||||
|
||||
:params
|
||||
s : the string to be converted
|
||||
@@ -1,5 +1,5 @@
|
||||
:sig
|
||||
String str_to_upper(String s)
|
||||
String to_upper(String s)
|
||||
|
||||
:params
|
||||
s : the string to be converted
|
||||
Reference in New Issue
Block a user