---
title: "Comment by Karan Pargal on \"🦀 Rust Series 02: CLI Game\" | Hashnode"
description: "In comparing strings, it was working when .trim() was added else it was giving it as false due to a newline character being there in the string"
url: "https://hashnode.com/posts/rust-series-02-cli-game/63e3418f4f69afd2796cf66f/comment/64ac9637395b682e51aba6ba"
---

[Discussion](https://hashnode.com/posts/rust-series-02-cli-game/63e3418f4f69afd2796cf66f)

Comment [🦀 Rust Series 02: CLI Game](https://hashnode.com/posts/rust-series-02-cli-game/63e3418f4f69afd2796cf66f)

[Karan Pargal](https://hashnode.com/@karanpargal)

[Jul 10, 2023](https://hashnode.com/posts/rust-series-02-cli-game/63e3418f4f69afd2796cf66f/comment/64ac9637395b682e51aba6ba)

In comparing strings, it was working when .trim() was added else it was giving it as false due to a newline character being there in the string

[New Wei](https://hashnode.com/@newwei)

[Jan 21, 2024](https://hashnode.com/posts/rust-series-02-cli-game/63e3418f4f69afd2796cf66f/comment/64ac9637395b682e51aba6ba#reply-65ad4ff337815e4cfdb75dbc)

correct
