Greetings,

Does
    vars.Add("URLSHORT", new String(url.sub(0,50)));
do what you are after?

Regarding customising, you could try
    vars.Add("URLSHORT", new
           String(url.sub(0,config->Value("url_truncation",50))));
which would allow the template variable  url_truncation  to override 
the default length of 50.

(These compile, but I haven't tested them...)

Cheers,
Lachlan

On Thu, 18 Dec 2003 21:39, Marc Logemann wrote:
> i want to modify Display.cc in order to have a template variable
> called SHORTURL, because the URL var break my html page.
>
> In Java i would do this (at line 243):
>     vars.Add("URLSHORT", new String(url.get()).substr(0,50));
>
> Please no vague answers, i need the whole code for doing substring
> operation and addition to the map (or whatever "vars" is).
>
> BTW: would be a nice feature to customize this in htdig.

-- 
[EMAIL PROTECTED]
ht://Dig developer DownUnder  (http://www.htdig.org)


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
ht://Dig Developer mailing list:
[EMAIL PROTECTED]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev

Reply via email to