# Plugin "Start Case" ignores all caps, and periods

**URL:** <https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818>\
**Category:** Ask for Help\
**Created:** [June 2, 2024, 4:29pm UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818 "2024-06-02T16:29:52Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtks](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dtks](https://community.glideapps.com/u/dtks)\
**Post date:** [June 2, 2024, 4:29pm UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/1 "2024-06-02T16:29:52Z")

</div>

Hi there,

 ![Screenshot 2024-06-03 at 12.20.16 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/f/8/f8e41140050124f8ef3143b729ba0a8464c2aabe.jpeg)  
Middle column is plugin → lowercase  
Right column is plugin → start case

There’s 2 bugs here (pardon me if it’s a feature)

First, when I tried to just use plugin → start case, I noticed that ALL CAPS words were not formatting properly. Meaning, ELTWINE should be Eltwine, but it comes out as ELTWINE instead.

So I did a workaround by having 2 plugins and that works.

Except for the 2nd bug at the last line. The periods disappeared from the rightmost column. Lowercase is fine though. I guess it treats the periods as indicators to start a new capital letter but I think if there’s no spacing between the letters and the periods, the periods shouldn’t function as a break. Ideally, I would like the final formatting to be Monster.com.sg Pte Ltd.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![Robert\_Petitto](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/robert_petitto/32/25193_2.png) [@Robert\_Petitto](https://community.glideapps.com/u/Robert_Petitto)\
**Post date:** [June 2, 2024, 4:56pm UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/2 "2024-06-02T16:56:04Z")

</div>

Interesting that it removes punctuation. I wonder if AI column would do a better job.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 2, 2024, 11:51pm UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/3 "2024-06-02T23:51:48Z")

</div>

I think in some cases, people want to keep certain words as uppercase if your input is uppercase, say “LTD”. The code Glide wrote here seems to be using that approach.

The second one indeed looks like a bug.

I think this would work for you at the moment.

```auto
await import("https://cdn.jsdelivr.net/npm/@gouch/to-title-case@2.2.1/to-title-case.min.js");

return p1.toLowerCase().toTitleCase()

```

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/e/8/e844928e21f9680f8eb65f2ab6f1ec902391d5c7.jpeg)

The package is a bit more intelligent in terms of what words to capitalize and what not. They don’t capitalize words like “a”, “the”, “of” whilst the native start case does.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/a/ba7d8f6d39f519629cd4272e162e7afe9528bd05.png)

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [June 3, 2024, 12:04am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/4 "2024-06-03T00:04:22Z")

</div>

Is this multilingual?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 3, 2024, 12:05am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/5 "2024-06-03T00:05:25Z")

</div>

When I tried Vietnamese, both approaches don’t work.

---

<div class="post-metadata">

**Author:** ![dtks](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dtks](https://community.glideapps.com/u/dtks)\
**Post date:** [June 3, 2024, 12:15am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/6 "2024-06-03T00:15:51Z")

</div>

Thanks!

Tried it ad it mostly works except for the monster line at the bottom

 ![Screenshot 2024-06-03 at 8.15.21 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/6/d/6db17129e760161c94bdcee07c710486bbc129ed.jpeg)

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [June 3, 2024, 12:40am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/7 "2024-06-03T00:40:10Z")

</div>

Please try this. I added a list of words to exclude so you can be more flexible.

```auto
const toTitleCase = str => str.toLowerCase().split(' ').map((word, index) => {
    if (index === 0 || !['of', 'a', 'an', 'the', 'and', 'but', 'or', 'for', 'nor', 'on', 'at', 'to', 'from', 'by', 'over'].includes(word)) {
        return word.charAt(0).toUpperCase() + word.slice(1);
    } else {
        return word;
    }
}).join(' ');

const result = toTitleCase(p1);
return result; 

```

---

<div class="post-metadata">

**Author:** ![dtks](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dtks](https://community.glideapps.com/u/dtks)\
**Post date:** [June 3, 2024, 1:18am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/8 "2024-06-03T01:18:40Z")

</div>

It works! But there’s a weird error though. But it works

 ![Screenshot 2024-06-03 at 9.19.05 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/8/4/84740211341454563f99a52dd0266f4a94d16ee9.png)

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [June 3, 2024, 1:21am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/9 "2024-06-03T01:21:25Z")

</div>

That’s not an error. That’s how the column behaves.

---

<div class="post-metadata">

**Author:** ![dtks](https://avatars.discourse-cdn.com/v4/letter/d/7bcc69/32.png) [@dtks](https://community.glideapps.com/u/dtks)\
**Post date:** [June 3, 2024, 1:23am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/10 "2024-06-03T01:23:17Z")

</div>

So I’d just ignore the “Function Error” part ya. Thank you it works well!

---

<div class="post-metadata">

**Author:** ![Himaladin](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/himaladin/32/71023_2.png) [@Himaladin](https://community.glideapps.com/u/Himaladin)\
**Post date:** [June 3, 2024, 1:24am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/11 "2024-06-03T01:24:31Z")

</div>

Try editing, for example, by adding a space and the message will disappear. But it will appear again if you open it again.  
You’re welcome

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 3, 2024, 3:27am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/12 "2024-06-03T03:27:05Z")

</div>

Maybe you just need to handle the empty cases before the function above. Try something like:

```auto
if(!p1) {
return "";
}

```

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 10, 2024, 3:28am UTC](https://community.glideapps.com/t/plugin-start-case-ignores-all-caps-and-periods/73818/13 "2024-06-10T03:28:03Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
