-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringplugin.html
More file actions
184 lines (184 loc) · 6.48 KB
/
stringplugin.html
File metadata and controls
184 lines (184 loc) · 6.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>dlvhex</title>
<link rel="stylesheet" type="text/css" media="all" href="css/reset.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/text.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/960.css"></link>
<link rel="stylesheet" type="text/css" media="all" href="css/style.css"></link>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
</head>
<body>
<!-- Title -->
<!--
<div class="container_12">
<div class="grid_12" id="title">
<h1>dlvhex</h1>
</div>
</div>
-->
<!-- Menu -->
<div class="container_12">
<div class="grid_12" id="menu">
<a href="index.html">About</a>
<a href="people.html">People</a>
<a href="news.html">News</a>
<a href="downloadb.html">Download Binaries</a>
<a href="downloads.html">Download Source</a>
<a href="support.html">Support</a>
<a href="documentation.html">Documentation</a>
<a href="demo.php">Online Demo</a>
<a href="http://asptut.gibbi.com/">ASP Tutorial</a>
<a href="related.html">Related Work</a>
<a href="applications.html">Applications</a>
<a href="literature.html">Literature</a>
</div>
</div>
<!-- Information -->
<div class="container_12">
<div class="grid_9">
<h2>The String Plugin</h2>
<p>
The String Plugin provides atoms for string operations and manipulations.
</p>
<p>
<code>&concat</code> takes two strings as input and returns their concatenation:
</p>
<div class="synopsis">
<div class="atomusage">&concat[A,B](X)</div>
<div>Input:</div>
<div class="param">A</div>
<div class="paramtext">string</div>
<div class="param">B</div>
<div class="paramtext">string</div>
<div style="clear: both;"></div>
<div>Output:</div>
<div class="param">X</div>
<div class="paramtext">Concatenation of A and B</div>
<div style="clear: both;"></div>
</div>
<p>
Example:
</p>
<pre>
fullstring(Full) :- &concat[P,F](Full), stringpair(P,F).</pre>
<p>
<code>&strstr</code> evaluates to <code>true</code> if the second input argument is a (case-insensitive) substring of the first:
</p>
<div class="synopsis">
<div class="atomusage">&strstr[A,B]</div>
<div>Input:</div>
<div class="param">A</div>
<div class="paramtext">string</div>
<div class="param">B</div>
<div class="paramtext">string</div>
<div style="clear: both;"></div>
</div>
<p>
Example:
</p>
<pre>
austrian_phone(P) :- &strstr[P,"+43"], phonenumber(P).</pre>
<p>
<code>&split</code> splits a string by a specified delimiter:
</p>
<div class="synopsis">
<div class="atomusage">&split[A,D,N](X)</div>
<div>Input:</div>
<div class="param">A</div>
<div class="paramtext">string to split</div>
<div class="param">D</div>
<div class="paramtext">delimiter</div>
<div class="param">N</div>
<div class="paramtext">index of item to return (starting from 0)</div>
<div style="clear: both;"></div>
<div>Output:</div>
<div class="param">X</div>
<div class="paramtext">N<sup>th</sup> substring of A, split by D</div>
<div style="clear: both;"></div>
</div>
<p>
Example:
</p>
<pre>
month(M) :- &split["2006-04-26","-",1](M).</pre>
<p>
<code>&sha1sum</code> calculates the SHA1 sum of a string:
</p>
<div class="synopsis">
<div class="atomusage">&sha1sum[A](X)</div>
<div>Input:</div>
<div class="param">A</div>
<div class="paramtext">string</div>
<div style="clear: both;"></div>
<div>Output:</div>
<div class="param">X</div>
<div class="paramtext">SHA1 sum of A</div>
<div style="clear: both;"></div>
</div>
<p>
Example:
</p>
<pre>
owner(ID) :- &sha1sum[X](ID), mailbox(X).</pre>
<div style="border-top: 1px solid #999; background-color: inherit; color: #999; font-size: 8.5pt;">
<p>$Id$</p>
</div>
</div>
<div class="grid_3">
<p> </p>
<p>
<img width="200" height="44" src="images/logo_whitebg.png" alt="dlvhex" id="logo">
</p>
<p>
<div style="font-size: 14pt"><label for="q">Search this Website</label></div>
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input name="cx" id="cx" value="010363983165505105153:4bhl-l5ixd4" type="hidden" alt="Search this website">
<input name="ie" id="ie" value="UTF-8" type="hidden" alt="Search this website">
<input style="background: rgb(255, 255, 255) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;" name="q" id="q" size="19" type="text">
<input name="sa" id="sa" value="Go" type="submit">
</div>
</form>
</p>
<p>
<span style="font-size: 14pt">General</span><br>
<a href="https://github.com/hexhex/">dlvhex source code @ github.com</a><br>
<!-- a href="https://sourceforge.net/projects/dlvhex/">dlvhex: Sourceforge project</a><br/ -->
<a href="doap.rdf">Description-Of-A-Project</a>
</p>
<p>
<span style="font-size: 14pt">Popular Plugins</span><br>
<!-- <a href="http://www.polleres.net/dlvhex-sparql">SPARQL Plugin</a><br> -->
<a href="actionplugin.html">Action Plugin</a><br>
<a href="decisiondiagramsplugin.html">DecisionDiagrams Plugin</a><br>
<a href="dlplugin.html">Description Logics Plugin</a><br>
<a href="dlliteplugin.html">Description Logics Lite Plugin</a><br>
<a href="mergingplugin.html">MELD: Belief Merging Plugin</a><br>
<a href="nestedhexplugin.html">Nested HEX Plugin</a><br>
<a href="http://www.kr.tuwien.ac.at/research/systems/mcsie">MCSIE Plugin</a><br>
<a href="stringplugin.html">String Plugin</a><br>
<a href="https://sourceforge.net/projects/dlvhex-semweb/">dlvhex-semweb Project</a><br>
</p>
<p>
<span style="font-size: 14pt">Documentation</span><br>
<a href="docs/userguide.pdf">User Guide</a><br>
<a href="https://github.com/hexhex/core/blob/master/README">README</a><br>
<a href="doc2x">doxygen</a><br>
<a href="doc2x/group__pluginframework.html">Writing Plugins in C++</a><br>
<a href="doc2x/group__pythonpluginframework.html">Writing Plugins in Python</a>
<!--
<a href="doc1x">doxygen version 1.X</a><br>
<a href="doc1x/group__pluginframework.html">Writing Plugins 1.X</a><br>
-->
</p>
</div> <!-- grid_3 -->
</div> <!-- container_12 -->
</body>
</html>
<!--
Local Variables:
mode: xml
End:
-->