Lines Matching refs:eg

9 	eg(1, Between("<a>foo</a>", "<a>", "</a>"))
10 eg(2, Between("<a>foo</a></a>", "<a>", "</a>"))
11 eg(3, Between("<a><a>foo</a></a>", "<a>", "</a>"))
12 eg(4, Between("<a><a>foo</a></a>", "<a>", "</a>"))
13 eg(5, Between("<a>foo", "<a>", "</a>"))
14 eg(6, Between("Some strings } are very {weird}, dont you think?", "{", "}"))
15 eg(7, Between("This is ateststring", "", "test"))
16 eg(8, Between("This is ateststring", "test", ""))
29 eg(1, Pipe("abc", BetweenF("a", "c")))
35 eg(1, Camelize("data_rate"))
36 eg(2, Camelize("background-color"))
37 eg(3, Camelize("-moz-something"))
38 eg(4, Camelize("_car_speed_"))
39 eg(5, Camelize("yes_we_can"))
49 eg(1, Capitalize("abc"))
50 eg(2, Capitalize("ABC"))
57 eg(1, CharAt("abc", 1))
58 eg(2, CharAt("", -1))
59 eg(3, CharAt("", 0))
60 eg(4, CharAt("", 10))
61 eg(5, CharAt("abc", -1))
62 eg(6, CharAt("abc", 10))
73 eg(1, Pipe("abc", CharAtF(1)))
79 eg(1, ChompLeft("foobar", "foo"))
80 eg(2, ChompLeft("foobar", "bar"))
81 eg(3, ChompLeft("", "foo"))
82 eg(4, ChompLeft("", ""))
83 eg(5, ChompLeft("foo", ""))
93 eg(1, Pipe("abc", ChompLeftF("ab")))
99 eg(1, ChompRight("foobar", "foo"))
100 eg(2, ChompRight("foobar", "bar"))
101 eg(3, ChompRight("", "foo"))
102 eg(4, ChompRight("", ""))
111 eg(1, Pipe("abc", ChompRightF("bc")))
117 eg(1, Classify("data_rate"))
118 eg(2, Classify("background-color"))
119 eg(3, Classify("-moz-something"))
120 eg(4, Classify("_car_speed_"))
121 eg(5, Classify("yes_we_can"))
131 eg(1, Clean("clean"))
132 eg(2, Clean(""))
133 eg(3, Clean(" please\t clean \t \n me "))
141 eg(1, Dasherize("dataRate"))
142 eg(2, Dasherize("CarSpeed"))
143 eg(3, Dasherize("yesWeCan"))
144 eg(4, Dasherize(""))
145 eg(5, Dasherize("ABC"))
155 eg(1, DecodeHTMLEntities("Ken Thompson &amp; Dennis Ritchie"))
156 eg(2, DecodeHTMLEntities("3 &lt; 4"))
157 eg(3, DecodeHTMLEntities("http:&#47;&#47;"))
165 eg(1, EnsurePrefix("foobar", "foo"))
166 eg(2, EnsurePrefix("bar", "foo"))
167 eg(3, EnsurePrefix("", ""))
168 eg(4, EnsurePrefix("foo", ""))
169 eg(5, EnsurePrefix("", "foo"))
179 eg(1, Pipe("dir", EnsurePrefixF("./")))
185 eg(1, EnsureSuffix("foobar", "bar"))
186 eg(2, EnsureSuffix("foo", "bar"))
187 eg(3, EnsureSuffix("", ""))
188 eg(4, EnsureSuffix("foo", ""))
189 eg(5, EnsureSuffix("", "bar"))
199 eg(1, Humanize("the_humanize_string_method"))
200 eg(2, Humanize("ThehumanizeStringMethod"))
201 eg(3, Humanize("the humanize string method"))
209 eg(1, Iif(true, "T", "F"))
210 eg(2, Iif(false, "T", "F"))
217 eg(1, IndexOf("abcdef", "a", 0))
218 eg(2, IndexOf("abcdef", "a", 3))
219 eg(3, IndexOf("abcdef", "a", -2))
220 eg(4, IndexOf("abcdef", "a", 10))
221 eg(5, IndexOf("", "a", 0))
222 eg(6, IndexOf("abcdef", "", 2))
223 eg(7, IndexOf("abcdef", "", 1000))
235 eg(1, IsAlpha("afaf"))
236 eg(2, IsAlpha("FJslfjkasfs"))
237 eg(3, IsAlpha("áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ"))
238 eg(4, IsAlpha("adflj43faljsdf"))
239 eg(5, IsAlpha("33"))
240 eg(6, IsAlpha("TT....TTTafafetstYY"))
241 eg(7, IsAlpha("-áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ"))
252 func eg(index int, example interface{}) { func
258 eg(1, IsAlphaNumeric("afaf35353afaf"))
259 eg(2, IsAlphaNumeric("FFFF99fff"))
260 eg(3, IsAlphaNumeric("99"))
261 eg(4, IsAlphaNumeric("afff"))
262 eg(5, IsAlphaNumeric("Infinity"))
263 eg(6, IsAlphaNumeric("áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ1234567890"))
264 eg(7, IsAlphaNumeric("-Infinity"))
265 eg(8, IsAlphaNumeric("-33"))
266 eg(9, IsAlphaNumeric("aaff.."))
267 eg(10, IsAlphaNumeric(".áéúóúÁÉÍÓÚãõÃÕàèìòùÀÈÌÒÙâêîôûÂÊÎÔÛäëïöüÄËÏÖÜçÇ1234567890"))
282 eg(1, IsEmpty(" "))
283 eg(2, IsEmpty("\t\t\t "))
284 eg(3, IsEmpty("\t\n "))
285 eg(4, IsEmpty("hi"))
294 eg(1, IsLower("a"))
295 eg(2, IsLower("A"))
296 eg(3, IsLower("abc"))
297 eg(4, IsLower("aBc"))
298 eg(5, IsLower("áéúóúãõàèìòùâêîôûäëïöüç"))
299 eg(6, IsLower("hi jp"))
300 eg(7, IsLower("ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÇ"))
301 eg(8, IsLower("áéúóúãõàèìòùâêîôûäëïöüçÁ"))
302 eg(9, IsLower("áéúóúãõàèìòùâêîôû äëïöüç"))
316 eg(1, IsNumeric("3"))
317 eg(2, IsNumeric("34.22"))
318 eg(3, IsNumeric("-22.33"))
319 eg(4, IsNumeric("NaN"))
320 eg(5, IsNumeric("Infinity"))
321 eg(6, IsNumeric("-Infinity"))
322 eg(7, IsNumeric("JP"))
323 eg(8, IsNumeric("-5"))
324 eg(9, IsNumeric("00099242424"))
338 eg(1, IsUpper("a"))
339 eg(2, IsUpper("A"))
340 eg(3, IsUpper("ABC"))
341 eg(4, IsUpper("aBc"))
342 eg(5, IsUpper("áéúóúãõàèìòùâêîôûäëïöüç"))
343 eg(6, IsUpper("HI JP"))
344 eg(7, IsUpper("ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎÔÛÄËÏÖÜÇ"))
345 eg(8, IsUpper("áéúóúãõàèìòùâêîôûäëïöüçÁ"))
346 eg(9, IsUpper("ÁÉÍÓÚÃÕÀÈÌÒÙÂÊÎ ÔÛÄËÏÖÜÇ"))
360 eg(1, Left("abcdef", 0))
361 eg(2, Left("abcdef", 1))
362 eg(3, Left("abcdef", 4))
363 eg(4, Left("abcdef", -2))
372 eg(1, LeftOf("abcdef", "def"))
373 eg(2, LeftOf("abcdef", "abc"))
374 eg(3, LeftOf("abcdef", ""))
375 eg(4, LeftOf("", "abc"))
376 eg(5, LeftOf("abcdef", "xyz"))
386 eg(1, Lines("a\r\nb\nc\r\n"))
387 eg(2, Lines("a\r\nb\nc\r\nd"))
394 eg(1, Match("foobar", `^fo.*r$`))
395 eg(2, Match("foobar", `^fo.*x$`))
396 eg(3, Match("", `^fo.*x$`))
404 eg(1, Pad("hello", "x", 5))
405 eg(2, Pad("hello", "x", 10))
406 eg(3, Pad("hello", "x", 11))
407 eg(4, Pad("hello", "x", 6))
408 eg(5, Pad("hello", "x", 1))
418 eg(1, PadLeft("hello", "x", 5))
419 eg(2, PadLeft("hello", "x", 10))
420 eg(3, PadLeft("hello", "x", 11))
421 eg(4, PadLeft("hello", "x", 6))
422 eg(5, PadLeft("hello", "x", 1))
432 eg(1, PadRight("hello", "x", 5))
433 eg(2, PadRight("hello", "x", 10))
434 eg(3, PadRight("hello", "x", 11))
435 eg(4, PadRight("hello", "x", 6))
436 eg(5, PadRight("hello", "x", 1))
446 eg(1, Pipe("\nabcdef \n", Clean, BetweenF("a", "f"), ChompLeftF("bc")))
452 eg(1, Pipe("abcdefab", ReplaceF("ab", "x", -1)))
453 eg(2, Pipe("abcdefab", ReplaceF("ab", "x", 1)))
454 eg(3, Pipe("abcdefab", ReplaceF("ab", "x", 0)))
462 eg(1, ReplacePattern("aabbcc", `a`, "x"))
468 eg(1, Pipe("aabbcc", ReplacePatternF(`a`, "x")))
474 eg(1, Reverse("abc"))
475 eg(2, Reverse("中文"))
482 eg(1, Right("abcdef", 0))
483 eg(2, Right("abcdef", 1))
484 eg(3, Right("abcdef", 4))
485 eg(4, Right("abcdef", -2))
494 eg(1, RightOf("abcdef", "abc"))
495 eg(2, RightOf("abcdef", "def"))
496 eg(3, RightOf("abcdef", ""))
497 eg(4, RightOf("", "abc"))
498 eg(5, RightOf("abcdef", "xyz"))
508 eg(1, Pipe("abcdef", RightF(3)))
514 eg(1, SliceContains([]string{"foo", "bar"}, "foo"))
515 eg(2, SliceContains(nil, "foo"))
516 eg(3, SliceContains([]string{"foo", "bar"}, "bah"))
517 eg(4, SliceContains([]string{"foo", "bar"}, ""))
526 eg(1, SliceIndexOf([]string{"foo", "bar"}, "foo"))
527 eg(2, SliceIndexOf(nil, "foo"))
528 eg(3, SliceIndexOf([]string{"foo", "bar"}, "bah"))
529 eg(4, SliceIndexOf([]string{"foo", "bar"}, ""))
530 eg(5, SliceIndexOf([]string{"foo", "bar"}, "bar"))
540 eg(1, Slugify("foo bar"))
541 eg(2, Slugify("foo/bar bah"))
542 eg(3, Slugify("foo-bar--bah"))
550 eg(1, StripPunctuation("My, st[ring] *full* of %punct)"))
556 eg(1, StripTags("<p>just <b>some</b> text</p>"))
557 eg(2, StripTags("<p>just <b>some</b> text</p>", "p"))
558 eg(3, StripTags("<a><p>just <b>some</b> text</p></a>", "a", "p"))
559 eg(4, StripTags("<a><p>just <b>some</b> text</p></a>", "b"))
568 eg(1, Substr("abcdef", 2, -1))
569 eg(2, Substr("abcdef", 2, 0))
570 eg(3, Substr("abcdef", 2, 1))
571 eg(4, Substr("abcdef", 2, 3))
572 eg(5, Substr("abcdef", 2, 4))
573 eg(6, Substr("abcdef", 2, 100))
574 eg(7, Substr("abcdef", 0, 1))
586eg(1, TemplateWithDelimiters("Hello {{name}} at {{date-year}}", map[string]interface{}{"name": "fo…
587eg(2, TemplateWithDelimiters("Hello #{name} at #{date-year}", map[string]interface{}{"name": "foo"…
588eg(3, TemplateWithDelimiters("Hello (name) at (date-year)", map[string]interface{}{"name": "foo", …
589eg(4, TemplateWithDelimiters("Hello [name] at [date-year]", map[string]interface{}{"name": "foo", …
590eg(5, TemplateWithDelimiters("Hello *name* at *date-year*", map[string]interface{}{"name": "foo", …
591eg(6, TemplateWithDelimiters("Hello $name$ at $date-year$", map[string]interface{}{"name": "foo", …
602eg(1, Template("Hello {{name}} at {{date-year}}", map[string]interface{}{"name": "foo", "date-year…
603 eg(2, Template("Hello {{name}}", map[string]interface{}{"name": ""}))
605eg(3, Template("Hello {name} at {date-year}", map[string]interface{}{"name": "foo", "date-year": 2…
613 eg(1, QuoteItems(ToArgv(`GO_ENV=test gosu --watch foo@release "some quoted string 'inside'"`)))
614 eg(2, QuoteItems(ToArgv(`gosu foo\ bar`)))
615 eg(3, QuoteItems(ToArgv(`gosu --test="some arg" -w -s a=123`)))
623 eg(1, ToBool("true"))
624 eg(2, ToBool("yes"))
625 eg(3, ToBool("1"))
626 eg(4, ToBool("on"))
627 eg(5, ToBool("false"))
628 eg(6, ToBool("no"))
629 eg(7, ToBool("0"))
630 eg(8, ToBool("off"))
631 eg(9, ToBool(""))
632 eg(10, ToBool("?"))
647 eg(1, ToBoolOr("foo", true))
648 eg(2, ToBoolOr("foo", false))
649 eg(3, ToBoolOr("true", false))
650 eg(4, ToBoolOr("", true))
659 eg(1, ToIntOr("foo", 0))
660 eg(2, ToIntOr("", 1))
661 eg(3, ToIntOr("100", 0))
662 eg(4, ToIntOr("-1", 1))
671 eg(1, Underscore("fooBar"))
672 eg(2, Underscore("FooBar"))
673 eg(3, Underscore(""))
674 eg(4, Underscore("x"))
683 eg(1, WrapHTML("foo", "span", nil))
684 eg(2, WrapHTML("foo", "", nil))
685 eg(3, WrapHTML("foo", "", map[string]string{"class": "bar"}))
693 eg(1, Pipe("foo", WrapHTMLF("div", nil)))