Skip to content

Instantly share code, notes, and snippets.

@zivanovicb
Created June 4, 2017 19:18
Show Gist options
  • Save zivanovicb/f0b35fe03cdec08892225e035dafa203 to your computer and use it in GitHub Desktop.
Save zivanovicb/f0b35fe03cdec08892225e035dafa203 to your computer and use it in GitHub Desktop.
rec
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApplication16
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string recenica = textBox1.Text.ToLower();
string rec = textBox2.Text.ToLower();
string modovana = recenica.Insert(0, " ");
string mod2 = modovana.Insert(modovana.Length, ".");
if (mod2.Contains(" " + rec + " ") || mod2.Contains(" " + rec + "."))
{
MessageBox.Show("Pronadjena je rec " + rec);
}
else
{
MessageBox.Show("Nije pronadjena rec");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment