Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Check if string is palindrome
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { //Your code goes here Console.WriteLine(IsPalindrome("Hello, world!")); } public static bool IsPalindrome(string value) { int min = 0; int max = value.Length - 1; while (true) { if (min > max) { return true; } char a = value[min]; char b = value[max]; if (char.ToLower(a) != char.ToLower(b)) { return false; } min++; max--; } } } }
run
|
edit
|
history
|
help
0
Generics
zmeika
asxasxdf
Math Operations
Main3-3
Palindrome Number
text
75 94
encypt& dcrypt
2.2 gz