<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>左側 &#8211; カミュプリィの雑多なメモ</title>
	<atom:link href="https://www.commuply.co.jp/technic/memo/tag/%E5%B7%A6%E5%81%B4/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.commuply.co.jp/technic/memo</link>
	<description></description>
	<lastBuildDate>Sun, 24 Aug 2025 04:44:54 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://www.commuply.co.jp/technic/memo/wp-content/uploads/site-icon-150x150.png</url>
	<title>左側 &#8211; カミュプリィの雑多なメモ</title>
	<link>https://www.commuply.co.jp/technic/memo</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>[言語比較]検索される文字値の検索値より左側</title>
		<link>https://www.commuply.co.jp/technic/memo/strleft/</link>
		
		<dc:creator><![CDATA[ume]]></dc:creator>
		<pubDate>Fri, 18 Mar 2022 05:26:52 +0000</pubDate>
				<category><![CDATA[未分類]]></category>
		<category><![CDATA[@Left]]></category>
		<category><![CDATA[@LeftBack]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[Lotus Script]]></category>
		<category><![CDATA[Lotus 式言語]]></category>
		<category><![CDATA[StrLeft]]></category>
		<category><![CDATA[StrLeftBack]]></category>
		<category><![CDATA[左側]]></category>
		<category><![CDATA[文字を検索]]></category>
		<category><![CDATA[比較方法]]></category>
		<category><![CDATA[言語比較]]></category>
		<guid isPermaLink="false">https://www.commuply.co.jp/technic/notesdomino/?p=100</guid>

					<description><![CDATA[C# ○番目の検索値より左側を返すユーザー関数です Excel 最初の検索値より左側を返す式はこちらです 最後の検索値より左側を返す式はこちらです（LETでまとめていません） Lotus Script 言語 左側から検索 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 id="c" class="wp-block-heading">C#</h2>



<p class="wp-block-paragraph">○番目の検索値より左側を返すユーザー関数です</p>



<pre class="wp-block-code"><code>/// &lt;summary&gt;
/// ○番目のキーより左側
/// &lt;/summary&gt;
/// &lt;returns&gt;さがす文字列より左側&lt;/returns&gt;
/// &lt;param name="source"&gt;検索される値&lt;/param&gt;
/// &lt;param name="key"&gt;検索値&lt;/param&gt;
/// &lt;param name="nth"&gt;何番目の検索値？(1-)&lt;/param&gt;
string StrLeft(string source, string key, int nth = 1)
{
	string result = source;
	if(1 &gt; nth)
	{
		result = @"";
		return result;
	}
	int start = 0;
	int next;
	for(int i = 1; i &lt; nth; i++)
	{
		next = source.IndexOf(key, start, StringComparison.CurrentCultureIgnoreCase);
		if(0 &gt; next)
		{
			break;
		}
		result = source.Substring(0, next);
		start = next + key.Length;
	}
	return result;
}</code></pre>



<h2 id="excel" class="wp-block-heading">Excel</h2>



<p class="wp-block-paragraph">最初の検索値より左側を返す式はこちらです</p>



<pre class="wp-block-code"><code>=LET(VVALUE,検索される値,VKEY,検索値,VERROR,エラー時の値,IFERROR(LEFT(VVALUE,FIND(VKEY,VVALUE)-1),VERROR))</code></pre>



<p class="wp-block-paragraph">最後の検索値より左側を返す式はこちらです（LETでまとめていません）</p>



<pre class="wp-block-code"><code>=LEFT(検索される値,FIND(仮の検索値,SUBSTITUTE(検索される値,検索値,仮の検索値,LEN(検索される値)-LEN(SUBSTITUTE(検索される値,検索値,"")))-1)</code></pre>



<h2 id="lotus-script-%25e8%25a8%2580%25e8%25aa%259e" class="wp-block-heading has-base-2-background-color has-background" style="padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--20)">Lotus Script 言語</h2>



<p class="wp-block-paragraph"><strong>左側から検索される値を検索します</strong><br>文字値 ＝ StrLeft （検索される値，検索値，比較方法，何番目の検索値？）<br>文字値 ＝ StrLeft （検索される値，検索値，比較方法）<br>文字値 ＝ StrLeft （検索される値，検索値）</p>



<p class="wp-block-paragraph"><strong>右側から検索される値を検索します</strong><br>文字値 ＝ StrLeftBack （検索される値，検索値，比較方法，何番目の検索値？）<br>文字値 ＝ StrLeftBack （検索される値，検索値，比較方法）<br>文字値 ＝ StrLeftBack （検索される値，検索値）</p>



<p class="wp-block-paragraph"><strong>比較方法</strong><br>0 ＝ 大文字小文字、全角半角を区別します<br>1 ＝ 大文字小文字を区別しません<br>4 ＝ 全角半角を区別しません<br>5 ＝ 大文字小文字、全角半角を区別しません</p>



<p class="wp-block-paragraph"><strong>戻り値には検索値を含みません</strong><br>例： ｛ABCAB｝ ＝ Strleft （｛ABCABC｝，｛c｝，1，2）</p>



<h2 id="lotus-%25e5%25bc%258f%25e8%25a8%2580%25e8%25aa%259e" class="wp-block-heading has-base-2-background-color has-background" style="padding-top:var(--wp--preset--spacing--30);padding-right:var(--wp--preset--spacing--20);padding-bottom:var(--wp--preset--spacing--30);padding-left:var(--wp--preset--spacing--20)">Lotus 式言語</h2>



<p class="wp-block-paragraph"><strong>左側から検索される値を検索します</strong><br>文字値 ＝ @Left （検索される値，検索値）</p>



<p class="wp-block-paragraph"><strong>右側から検索される値を検索します</strong><br>文字値 ＝ @LeftBack （検索される値，検索値）</p>



<p class="wp-block-paragraph"><strong>戻り値には検索値を含みません</strong><br>例： ｛AB｝ ＝ @Left （｛ABCABC｝，｛C｝）</p>



<p class="wp-block-paragraph"><strong>大文字小文字、全角半角を区別します</strong><br>例： ｛ABCab｝ ＝ @Left （｛ABCabc｝，｛c｝）</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
