tdot4.nim 588 B

123456789101112131415161718
  1. discard """
  2. disabled:true
  3. $nimsuggest --tester --maxresults:2 $file
  4. >sug $1
  5. sug;;skProc;;tdot4.main;;proc (inp: string): string;;$file;;10;;5;;"";;100;;None
  6. sug;;skProc;;strutils.replace;;proc (s: string, sub: string, by: string): string{.noSideEffect, gcsafe, locks: 0.};;$lib/pure/strutils.nim;;1506;;5;;"Replaces `sub` in `s` by the string `by`.";;100;;None
  7. """
  8. import strutils
  9. proc main(inp: string): string =
  10. # use replace here and see if it occurs in the result, it should gain
  11. # priority:
  12. result = inp.replace(" ", "a").replace("b", "c")
  13. echo "string literal here".#[!]#