Lines Matching refs:str

337  * @param {string} [str=''] - The string token being wrapped.
340 lunr.Token = function (str, metadata) {
341 this.str = str || ""
351 return this.str
359 * @param {string} str - The string representation of the token.
367 * token.update(function (str, metadata) {
368 * return str.toUpperCase()
375 this.str = fn(this.str, this.metadata)
388 return new lunr.Token (fn(this.str, this.metadata), this.metadata)
427 var str = obj.toString().toLowerCase(),
428 len = str.length,
432 var char = str.charAt(sliceEnd),
444 str.slice(sliceStart, sliceEnd),
698 * @param {string} str - The string to pass through the pipeline.
703 lunr.Pipeline.prototype.runString = function (str, metadata) {
704 var token = new lunr.Token (str, metadata)
1433 * @param {string} str - The string to create the token set from.
1437 lunr.TokenSet.fromFuzzyString = function (str, editDistance) {
1443 str: str
1450 if (frame.str.length > 0) {
1451 var char = frame.str.charAt(0),
1461 if (frame.str.length == 1) {
1468 str: frame.str.slice(1)
1484 if (frame.str.length == 0) {
1491 str: frame.str
1497 if (frame.str.length > 1) {
1501 str: frame.str.slice(1)
1506 // just removing the last character from the str
1507 if (frame.str.length == 1) {
1514 if (frame.str.length >= 1) {
1522 if (frame.str.length == 1) {
1529 str: frame.str.slice(1)
1536 if (frame.str.length > 1) {
1537 var charA = frame.str.charAt(0),
1538 charB = frame.str.charAt(1),
1548 if (frame.str.length == 1) {
1555 str: charA + frame.str.slice(2)
1570 * @param {string} str - The string to create a TokenSet from.
1573 lunr.TokenSet.fromString = function (str) {
1585 for (var i = 0, len = str.length; i < len; i++) {
1586 var char = str[i],
1673 var str = this.final ? '1' : '0',
1681 str = str + label + node.id
1684 return str
2983 lunr.QueryLexer = function (str) {
2985 this.str = str
2986 this.length = str.length
3007 subSlices.push(this.str.slice(sliceStart, sliceEnd))
3011 subSlices.push(this.str.slice(sliceStart, this.pos))
3020 str: this.sliceString(),
3038 var char = this.str.charAt(this.pos)
3192 lunr.QueryParser = function (str, query) {
3193 this.lexer = new lunr.QueryLexer (str)
3245 if (lexeme.str.length >= 1) {
3246 errorMessage += " with value '" + lexeme.str + "'"
3260 switch (lexeme.str) {
3268 var errorMessage = "unrecognised presence operator'" + lexeme.str + "'"
3297 if (parser.query.allFields.indexOf(lexeme.str) == -1) {
3299 errorMessage = "unrecognised field '" + lexeme.str + "', possible fields: " + possibleFields
3304 parser.currentClause.fields = [lexeme.str]
3329 parser.currentClause.term = lexeme.str.toLowerCase()
3331 if (lexeme.str.indexOf("*") != -1) {
3369 var editDistance = parseInt(lexeme.str, 10)
3412 var boost = parseInt(lexeme.str, 10)