uppercase - Convert string to Upper and Lower case Turbo Prolog -


how convert string upper , lower case in turbo prolog.

string_upper , string_lower function swi prolog,

i found like,

tolower([], []). tolower([upper|uppertail], [lower|lowertail]) :- char_type(lower, to_lower(upper)), tolower(uppertail, lowertail). 

but didn't is. can me solve this.

i did using upper_lower(),

write("enter string convert\n"), readln(str1),   upper_lower(str1,low), write("in lower case "), write(low),nl, write("in upper case "), upper_lower(upp,str1), write(upp).  

the upper_lower predicate: upper_lower predicate can used convert uppercase characters lowercase, or lowercase letters uppercase. general form of predicate upper_lower(uppercasestring, lowercaseuppercasestring)


Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -