From 48a8448aa0fe2bfce8c1bb8cffb31e4fdcfa28b4 Mon Sep 17 00:00:00 2001 From: Paul Larsen Date: Mon, 27 Jul 2026 10:51:56 -0400 Subject: [PATCH] B2026-053-Global-Search-should-not-return-partial-matches --- PROMS/Volian.Controls.Library/DisplaySearch.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PROMS/Volian.Controls.Library/DisplaySearch.cs b/PROMS/Volian.Controls.Library/DisplaySearch.cs index ef100b56..57a12ad4 100644 --- a/PROMS/Volian.Controls.Library/DisplaySearch.cs +++ b/PROMS/Volian.Controls.Library/DisplaySearch.cs @@ -2193,18 +2193,22 @@ namespace Volian.Controls.Library private string exactsearch(string SearchString) // B2026-053 { - string ss = ""; + //string ss = ""; + StringBuilder ss = new StringBuilder(); int sl = SearchString.Length; int LstIdxSp = SearchString.LastIndexOf(' '); if (sl == LstIdxSp + 1) // B2026-053 if ' ' the last char. { - ss = ' ' + SearchString; //add a space prefix to make the search exact if the end of the search string is a space. + ss.Append(' '); + ss.Append(SearchString); // B2026-053 add a space prefix to make the search exact if the end of the searchString is a space. } else { - ss = ' ' + SearchString + ' '; // Exact match add spaces before and after search string. + ss.Append(' '); + ss.Append(SearchString); // B2026-053 Exact match add spaces before and after searchString. + ss.Append(' '); } - return ss; + return ss.ToString(); } private void ClearResults() // B2021-103 if no results when RNO only, clear results list. (moved from btnSearch_Click)