I want to know how do you use Emacs lisp to check the content of the current buffer, specially to know if certain string exists within the current buffer.
I think the easiest approach would be
(save-excursion (goto-char (point-min)) (search-forward string nil t))
This will return non-nil if the given string is in the current buffer.
You can also do this on a way which probably looks familiar from other languages using s.el:
(with-current-buffer "some_buffer" (s-contains? "some string" (buffer-substring-no-properties (point-min) (point-max))))