opt into phobos functions here as arsd.core starts to replace

This commit is contained in:
Adam D. Ruppe 2025-09-07 10:27:51 -04:00
parent 97e560bcff
commit 13a767fd31
3 changed files with 7 additions and 3 deletions

2
html.d
View File

@ -10,6 +10,8 @@ module arsd.html;
import arsd.core : encodeUriComponent;
import std.string : indexOf, startsWith, endsWith, strip;
public import arsd.dom;
import arsd.color;

View File

@ -10,6 +10,7 @@ import arsd.color;
import std.string;
import std.uni : isWhite;
import std.string : indexOf, startsWith, endsWith, strip;
///
class HtmlConverter {

7
web.d
View File

@ -11,7 +11,6 @@
+/
module arsd.web;
static if(__VERSION__ <= 2076) {
// compatibility shims with gdc
enum JSONType {
@ -226,6 +225,8 @@ public import std.range;
public import std.traits;
import std.json;
import std.string : indexOf, endsWith, startsWith;
/// This gets your site's base link. note it's really only good if you are using FancyMain.
string getSiteLink(Cgi cgi) {
return cgi.requestUri[0.. cgi.requestUri.indexOf(cgi.scriptName) + cgi.scriptName.length + 1 /* for the slash at the end */];
@ -631,7 +632,7 @@ class ApiProvider : WebDotDBaseType {
continue;
// the builtins aren't interesting either
if(key.startsWith("builtin."))
if(std.string.startsWith(key, "builtin."))
continue;
if(func.originalName.length)
@ -1879,7 +1880,7 @@ Form createAutomaticForm(Document document, string action, in Parameter[] parame
} else if (type == "radio") {
assert(0, "FIXME");
} else {
if(type.startsWith("textarea")) {
if(std.string.startsWith(type, "textarea")) {
input = Element.make("textarea");
input.name = param.name;
input.innerText = param.value;